Element

Class representing an XML element.

Constructors

this
this(string name, string interior)

Constructs an Element given a name and a string to be used as a Text interior.

this
this(const(Tag) tag_)

Constructs an Element from a Tag.

Members

Functions

opCmp
int opCmp(Object o)

Compares two Elements

opEquals
bool opEquals(Object o)

Compares two Elements for equality

opOpAssign
void opOpAssign(Text item)

Append a text item to the interior of this element

opOpAssign
void opOpAssign(CData item)

Append a CData item to the interior of this element

opOpAssign
void opOpAssign(Comment item)

Append a comment to the interior of this element

opOpAssign
void opOpAssign(ProcessingInstruction item)

Append a processing instruction to the interior of this element

opOpAssign
void opOpAssign(Element item)

Append a complete element to the interior of this element

pretty
string[] pretty(uint indent)

Returns an indented string representation of this item

text
string text(DecodeMode mode)

Returns the decoded interior of an element.

toHash
size_t toHash()

Returns the hash of an Element

toString
string toString()

Returns the string representation of an Element

Properties

isEmptyXML
bool isEmptyXML [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

cdatas
CData[] cdatas;

The element's CData items

comments
Comment[] comments;

The element's comments

elements
Element[] elements;

The element's child elements

items
Item[] items;

The element's items

pis
ProcessingInstruction[] pis;

The element's processing instructions

tag
Tag tag;

The start tag of the element

texts
Text[] texts;

The element's text items

Inherited Members

From Item

opEquals
bool opEquals(Object o)

Compares with another Item of same type for equality

opCmp
int opCmp(Object o)

Compares with another Item of same type

toHash
size_t toHash()

Returns the hash of this item

toString
string toString()

Returns a string representation of this item

pretty
string[] pretty(uint indent)

Returns an indented string representation of this item

isEmptyXML
bool isEmptyXML [@property getter]

Returns true if the item represents empty XML text

Meta

Standards

XML 1.0