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.
A new XML DOM element.
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.