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

The type of the document implementation.

InternalNode
alias InternalNode = Element

The type of the node implementation.

QueryNode
alias QueryNode = Element

The type of the query node implementation.

VisitorType
alias VisitorType = Element[]

The type of the visitor type implementation.

Functions

createNode
Node createNode(string name, string value)

Attaches a new node to the docuement.

header
XmlDocument header(string encoding)

Attaches a header to the document.

parse
void parse(string xml)

Parses the given string of XML.

query
QueryProxy 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.

Structs

Node
struct Node

A generic document node

QueryProxy
struct QueryProxy

This an XPath query handle used to perform queries on a set of elements.

VisitorProxy
struct VisitorProxy

foreach support for visiting a set of nodes.

Variables

currentNode
InternalNode currentNode;
Undocumented in source.
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