docx
    Preparing search index...

    Type Alias XmlElement

    A node of an XML document, or the document itself.

    It has the shape of xml-js's non-compact Element, which docx used before it read XML itself, so a tree from xml-js can still be given wherever docx takes one. type says which of the other fields the node has:

    • The document has no type. It has its declaration, if it has one, and the nodes at its top level in elements.
    • "element" has its name, and its attributes and elements if it has any.
    • "text" has its text, with entities such as & decoded.
    • "cdata", "comment" and "doctype" have their content in the field of their name.
    • "instruction", a processing instruction such as <?mso-application progid="Word.Document"?>, has its name and the rest in instruction.
    type XmlElement = {
        attributes?: XmlAttributes;
        cdata?: string;
        comment?: string;
        declaration?: { attributes?: XmlDeclarationAttributes };
        doctype?: string;
        elements?: XmlElement[];
        instruction?: string;
        name?: string;
        text?: string | number | boolean;
        type?: string;
    }
    Index
    attributes?: XmlAttributes
    cdata?: string
    comment?: string
    declaration?: { attributes?: XmlDeclarationAttributes }
    doctype?: string
    elements?: XmlElement[]
    instruction?: string
    name?: string
    text?: string | number | boolean
    type?: string