XML document encapsulates the root element and document type.
Slots
- addSource
-
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. - docTypeSource
-
XDocType? docType
Document type declaration or null if undefined.
- makeSource
-
new make(XElem? root := null)
Construct with optional root elem.
-
const static internal XPi[] noPis := XPi[,]
- nodeTypeSource
-
override XNodeType nodeType()
Overrides xml::XNode.nodeType
Return the
XNodeType.doc
. -
internal XPi[] piList := noPis
- pisSource
-
XNode[] pis()
Get any processing instructions declared before the root element. Processing instructions after the root are not supported.
- removePiSource
-
Remove the processing instruction by reference.
- rootSource
-
XElem root
Root element.
- toStrSource
-
override Str toStr()
Overrides sys::Obj.toStr
Return string representation.
- writeSource
-
override Void write(OutStream out)
Overrides xml::XNode.write
Write this node to the output stream.