Function parseXml

  • Parses the given XML string and returns an XmlDocument instance representing the document tree.

    Parameters

    • xml: string

      XML string to parse.

    • Optionaloptions: ParserOptions

      Parser options.

    Returns XmlDocument

    import { parseXml } from '@rgrove/parse-xml';
    let doc = parseXml('<kittens fuzzy="yes">I like fuzzy kittens.</kittens>');