XmlPath.NodeSet

This is the meat of XPath support. All of the NodeSet operators exist here, in order to enable call-chaining.

Note that some of the axis do double-duty as a filter also. This is just a convenience factor, and doesn't change the underlying mechanisms.

Members

Functions

ancestor
NodeSet ancestor(T[] name)

Return a set containing all ancestor elements of the nodes within this set, which match the optional name

ancestor
NodeSet ancestor(bool delegate(Node) filter)

Return a set containing all ancestor nodes of the nodes within this set, which pass the given filtering test

attribute
NodeSet attribute(T[] name)

Return a set containing all attributes of the nodes within this set, which match the optional name

attribute
NodeSet attribute(bool delegate(Node) filter)

Return a set containing all attribute nodes of the nodes within this set which pass the given filtering test

cdata
NodeSet cdata(T[] value)

Return a set containing all cdata nodes of the nodes within this set, which match the optional value

child
NodeSet child(T[] name)

Return a set containing all child elements of the nodes within this set, which match the optional name

child
NodeSet child(bool delegate(Node) filter, XmlNodeType type)

Return a set containing all child nodes of the nodes within this set which pass the filtering test

count
size_t count()

Return the number of selected nodes in the set

data
NodeSet data(T[] value)

Return a set containing all data nodes of the nodes within this set, which match the optional value

descendant
NodeSet descendant(T[] name)

Return a set containing all descendant elements of the nodes within this set, which match the given name

descendant
NodeSet descendant(bool delegate(Node) filter, XmlNodeType type)

Return a set containing all descendant nodes of the nodes within this set, which pass the given filtering test

dup
NodeSet dup()

Return a duplicate NodeSet

filter
NodeSet filter(bool delegate(Node) filter)

Return a set containing all nodes within this set which pass the filtering test

first
NodeSet first()

Return a set containing just the first node of the current set

last
NodeSet last()

Return a set containing just the last node of the current set

next
NodeSet next(T[] name)

Return a set containing all subsequent sibling elements of the nodes within this set, which match the optional name

next
NodeSet next(bool delegate(Node) filter, XmlNodeType type)

Return a set containing all following siblings of the ones within this set, which pass the given filtering test

nth
NodeSet nth(size_t index)

Return a set containing just the nth node of the current set

opApply
int opApply(int delegate(ref Node) dg)

Traverse the nodes of this set

opIndex
NodeSet opIndex(uint i)

Return a set containing just the nth node of the current set

opIndex
NodeSet opIndex(T[] name)

Return a set containing all child elements of the nodes within this set, which match the given name

opSlice
NodeSet opSlice()

Return a set containing all child elements of the nodes within this set

parent
NodeSet parent(T[] name)

Return a set containing all parent elements of the nodes within this set, which match the optional name

parent
NodeSet parent(bool delegate(Node) filter)

Return a set containing all parent nodes of the nodes within this set which pass the given filtering test

prev
NodeSet prev(T[] name)

Return a set containing all prior sibling elements of the nodes within this set, which match the optional name

prev
NodeSet prev(bool delegate(Node) filter, XmlNodeType type)

Return a set containing all prior sibling nodes of the ones within this set, which pass the given filtering test

Variables

nodes
Node[] nodes;

array of selected nodes

Meta