class xml::XDoc

sys::Obj
  xml::XNode
    xml::XDoc

@Js

Source

XML document encapsulates the root element and document type.

add

@Operator
This add(Obj child)

Source

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.

docType

XDocType? docType

Source

Document type declaration or null if undefined.

make

new make(XElem? root := null)

Source

Construct with optional root elem.

nodeType

virtual override XNodeType nodeType()

Source

Return the XNodeType.doc.

pis

XNode[] pis()

Source

Get any processing instructions declared before the root element. Processing instructions after the root are not supported.

removePi

XPi? removePi(XPi pi)

Source

Remove the processing instruction by reference.

root

XElem root

Source

Root element.

toStr

virtual override Str toStr()

Source

Return string representation.

write

virtual override Void write(OutStream out)

Source

Write this node to the output stream.