Node

Represents a node in a DOM

Constructors

this
this()

Makes a naked node object

this
this(string tag)

Makes a node with a given tagname

this
this(string tag, T startPosition)

Makes a node with a given tagname and with the information for the position in the Document

Members

Functions

addAttribute
void addAttribute(Attribute attribute)

Does what the name says

addChild
void addChild(Node* pNode)

Adds a node as a child node

getAncestors
Node[] getAncestors()
Undocumented in source. Be warned that the author may not have intended to support it.
getAttributes
Attribute[] getAttributes()

Does what the name says

getChildren
Node[] getChildren()

Does what the name says

getDescendants
Node[] getDescendants()
Undocumented in source. Be warned that the author may not have intended to support it.
getEndPosition
uint getEndPosition()
getEndTagLength
ushort getEndTagLength()

Does what the name says

getParent
Node getParent()

Does what the name says

getSiblings
Node[] getSiblings()

Does what the name says

getStartPosition
uint getStartPosition()
getStartTagLength
ushort getStartTagLength()

Does what the name says

getTag
string getTag()

Does what the name says

hasChildren
size_t hasChildren()
hasParent
bool hasParent()
isComment
Node isComment(bool sw)

Markes this node to be inside of a comment

isComment
bool isComment()
setEndPosition
Node setEndPosition(T position)

Sets the position in the document where this node ends

setEndTagLength
Node setEndTagLength(T length)

Does what the name says

setParent
void setParent(Node* pNode)

Sets the given node as the parent node

setStartPosition
Node setStartPosition(T position)

Sets the position in the document where this node begins

setStartTagLength
Node setStartTagLength(T length)

Does what the name says

setTag
Node setTag(string tag)

Sets the tagname

Meta