Serializes an XmlNode back to its on-the-wire form.
Attribute values and text are entity-escaped; an element with no children is emitted self-closing (<x/>).
<x/>
The element or text to serialize.
The XML string.
1.0.4
import { el, serialize } from 'edgeport/xmpp';serialize(el('body', {}, 'hi & bye')); // <body>hi & bye</body> Copy
import { el, serialize } from 'edgeport/xmpp';serialize(el('body', {}, 'hi & bye')); // <body>hi & bye</body>
Serializes an XmlNode back to its on-the-wire form.
Attribute values and text are entity-escaped; an element with no children is emitted self-closing (
<x/>).