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.
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.typesays which of the other fields the node has:type. It has itsdeclaration, if it has one, and the nodes at its top level inelements."element"has itsname, and itsattributesandelementsif it has any."text"has itstext, 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 itsnameand the rest ininstruction.