Tag

Class representing an XML tag.

Constructors

this
this(string name, TagType type)

Constructs an instance of Tag with a specified name and type

Members

Functions

opCmp
int opCmp(Object o)

Compares two Tags

opEquals
bool opEquals(Object o)

Compares two Tags for equality

toHash
size_t toHash()

Returns the hash of a Tag

toString
string toString()

Returns the string representation of a Tag

Properties

isEmpty
bool isEmpty [@property getter]

Returns true if the Tag is an empty tag

isEnd
bool isEnd [@property getter]

Returns true if the Tag is an end tag

isStart
bool isStart [@property getter]

Returns true if the Tag is a start tag

Variables

attr
string[string] attr;

Associative array of attributes

name
string name;

Tag name

s
string s;
Undocumented in source.
t
string t;
Undocumented in source.
type
TagType type;

Type of tag

Meta

Standards

XML 1.0

The class invariant guarantees <ul> <li> that type is a valid enum TagType value</li> <li> that name consists of valid characters</li> <li> that each attribute name consists of valid characters</li> </ul>