XmlDocument

This class represents an XML DOM document. It provides a common interface to the XML document implementations available in Phobos and Tango.

Constructors

this
this(bool strictErrorChecking)

Creates a new instance of this class

Members

Aliases

Doc
alias Doc = Document!(T)

The type of the document implementation.

Node
alias Node = Doc.Node

The type of the node implementation.

VisitorType
alias VisitorType = Doc.Visitor

The type of the visitor type implementation.

tstring
alias tstring = const(T)[]

The type of the query node implementation.

Functions

createNode
Node createNode(tstring name, tstring value)

Attaches a new node to the docuement.

header
XmlDocument header(tstring encoding)

Attaches a header to the document.

parse
void parse(tstring xml)

Parses the given string of XML.

query
auto query()

Return an xpath handle to query this document. This starts at the document root.

reset
XmlDocument reset()

Rests the reciver. Allows to parse new content.

toString
string toString()

Pretty prints the document.

tree
Node tree()

Return the root document node, from which all other nodes are descended.

Variables

indentation
uint indentation;

The number of spaces used for indentation used when printing the document.

strictErrorChecking
bool strictErrorChecking;

Set this to true if there should be strict errro checking.

Meta