This XML API was in part inspired from XOM.
Base class for all nodes of the XML document model.
Document object at root of the XML document model.
auto doc = new Document; doc.read("<hello>world</hello>");
The document's root element.
List of nodes at the root of the document.
Read the document from the given XML input.
|string input||XML input to read the document from.|
Throws: at any well-formness error. The document will contain the tree that was built up to the error point.
Note: read will replace any existing content in the document.
Element node for the XML document model.
Document this element belongs to.
Name of this element.
Attributes of this element.
Content of this elements.
Create a new Element with the given name.
|Document document||the document this elements fits in.|
|string name||the name of this element.|
Processing instruction node for the XML document model.
Target processor of this PI.
Content of this PI.
Create a new PI for the given target and content.
|string target||name of the target processor|
|string content||content of this processor instruction|
Comment node for the XML document model.
Content of this comment.
Create a new Comment with the given content.
|string content||textual content of this comment.|
Represents a run of text. CDATA sections are not treated differently than normal text. Text objects may be adjacent to other Text objects.
Content of this text node.
Create a new Text with the given content.
|string content||textual content of this text node.|