Documentation
    Preparing search index...

    Module @svta/cml-xmlBeta

    A collection of tools for working with XML.

    @svta/cml-xml

    XML parsing utilities.

    npm i @svta/cml-xml
    
    import { decodeXml } from "@svta/cml-xml";

    const obj = decodeXml(
    `<root>
    <child>text</child>
    <ns:tag>content</ns:tag>
    </root>`
    );

    assert(obj.childNodes[0].nodeName === "root");
    assert(obj.childNodes[0].childNodes[0].nodeName === "child");
    assert(obj.childNodes[0].childNodes[0].childNodes[0].nodeValue === "text");
    assert(obj.childNodes[0].childNodes[1].nodeName === "ns:tag");
    assert(obj.childNodes[0].childNodes[1].prefix === "ns");
    assert(obj.childNodes[0].childNodes[1].localName === "tag");

    Type Aliases

    XmlNode
    XmlParseOptions

    Functions

    getElementsByName
    parseXml
    serializeXml