interface

XML.ParseOptions

interface ParseOptions

  • compact?: boolean

    Selects the shape of the result.

    • true (default): the compact Document — elements keyed by name, leaves as strings. The shape for data. It does not keep the relative order of differently named siblings, where text sat relative to child elements, comments, or processing instructions.
    • false: the root element as a Node tree, which keeps all of those, in document order. The shape for documents.

    Neither shape represents the XML declaration, the document type declaration, or anything outside the root element.