Strophe.js
    Preparing search index...

    Function xmlElement

    • Create an XML DOM element.

      This function creates an XML DOM element correctly across all implementations. Note that these are not HTML DOM elements, which aren't appropriate for XMPP stanzas.

      Parameters

      • name: string

        The name for the element.

      • Optionalattrs: XmlElementAttrs

        An optional array or object containing key/value pairs to use as element attributes. The object should be in the format {'key': 'value'}. The array should have the format [['key1', 'value1'], ['key2', 'value2']].

      • Optionaltext: string | number

        The text child data for the element.

      Returns Element

      A new XML DOM element.