edgeport - v1.0.6
    Preparing search index...

    Function serialize

    • 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/>).

      Parameters

      • node: XmlNode

        The element or text to serialize.

      Returns string

      The XML string.

      1.0.4

      import { el, serialize } from 'edgeport/xmpp';

      serialize(el('body', {}, 'hi & bye')); // <body>hi &amp; bye</body>