View source code
Display the source code in std/xml.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Class std.xml.Tag

Class representing an XML tag.

class Tag ;

Constructors

NameDescription
this (name, type) Constructs an instance of Tag with a specified name and type

Fields

NameTypeDescription
attr string[string]Associative array of attributes
name stringTag name
type TagTypeType of tag

Properties

NameTypeDescription
isEmpty[get] boolReturns true if the Tag is an empty tag
isEnd[get] boolReturns true if the Tag is an end tag
isStart[get] boolReturns true if the Tag is a start tag

Methods

NameDescription
opCmp (o) Compares two Tags
opEquals (o) Compares two Tags for equality
toHash () Returns the hash of a Tag
toString () Returns the string representation of a Tag
factory (classname) Create instance of class specified by the fully qualified name classname. The class must either have no constructors or have a default constructor.
opCmp (o) Compare with another Object obj.
opEquals (o) Test whether this is equal to o. The default implementation only compares by identity (using the is operator). Generally, overrides for opEquals should attempt to compare objects by their contents.
toHash () Compute hash function for Object.
toString () Convert Object to a human readable string.

Standards

XML 1.0

The class invariant guarantees

  • that type is a valid enum TagType value
  • that name consists of valid characters
  • that each attribute name consists of valid characters

Authors

Janice Caron

License

Boost License 1.0.