XmlDocument

Root node representing a parsed XML document.

Constructors

this
this()
Undocumented in source.
this
this(string s)

Create and parse from input.

Members

Properties

dup
XmlDocument dup [@property getter]

Creates a deep copy of this document.

Inherited Members

From XmlNode

tag
string tag;

The tag name, or the contents for text / comment / CDATA nodes.

attributes
XmlAttributes attributes;

Tag attributes.

parent
XmlNode parent;

Parent node.

children
XmlNode[] children;

Children nodes.

type
XmlNodeType type;

Node type.

startPos
ulong startPos;
endPos
ulong endPos;

Start and end offset within the input.

addAttribute
XmlNode addAttribute(string name, string value)

Set an attribute with the given value.

addChild
XmlNode addChild(XmlNode child)

Add a child node, making this node its parent.

toString
string toString()

Return XML string.

toPrettyString
string toPrettyString()

Return pretty-printed XML string (with indentation).

writeTo
void writeTo(XmlWriter output)

Write to an XmlWriter.

text
string text [@property getter]

Attempts to retrieve the text contents of this node. <br> tags are converted to newlines.

findChild
XmlNode findChild(string tag)

Returns the first immediate child which is a tag and has the tag name tag.

findChildren
XmlNode[] findChildren(string tag)

Returns all immediate children which are a tag and have the tag name tag.

opIndex
XmlNode opIndex(string tag)

Like findChild, but throws an exception if no such node is found.

opIndex
XmlNode opIndex(string tag, size_t index)

Like findChildren[index], but throws an exception if there are not enough such nodes.

opIndex
XmlNode opIndex(size_t index)

Returns the immediate child with the given index.

length
size_t length [@property getter]

Returns the number of children nodes.

opDollar
alias opDollar = length
Undocumented in source.
opApply
int opApply(int delegate(ref XmlNode) dg)

Iterates over immediate children.

dup
XmlNode dup [@property getter]

Creates a deep copy of this node.

Meta