XDoc
@Js
class XDoc : XNode
XML document encapsulates the root element and document type.
Construct with optional root elem
Document type declaration or null if undefined
Root element
Add a node to the document
Return string representation
Remove the processing instruction by reference
Get any processing instructions declared before the root element
Return the XNodeType.doc
Write this node to the output stream
@Operator
This add(Obj child)
Add a node to the document. If the node is an XElem then it is defined as the root element, otherwise the child must be a XPi. Return this.
XDocType? : docType
Document type declaration or null if undefined.
new make(XElem? root)
Construct with optional root elem.
virtual XNodeType nodeType()
Return the XNodeType.doc.
XNode[] pis()
Get any processing instructions declared before the root element. Processing instructions after the root are not supported.
XPi? removePi(XPi pi)
Remove the processing instruction by reference.
XElem : root
Root element.
virtual Str toStr()
Return string representation.
virtual Void write(OutStream out)
Write this node to the output stream.