- void* user [public] ¶#
-
open for usage
- Document document() ¶#
-
Return the hosting document
- XmlNodeType type() ¶#
-
Return the node type-id
- Node parent() ¶#
-
Return the parent, which may be null
- Node child() ¶#
-
Return the first child, which may be null
- Node childTail() [deprecated] ¶#
-
Return the last child, which may be null
exposes too much implementation detail.
Please file a ticket if you really need
this functionality
- Node prev() ¶#
-
Return the prior sibling, which may be null
- Node next() ¶#
-
Return the next sibling, which may be null
- T[] prefix() ¶#
-
Return the namespace prefix of this node (may be null)
- Node prefix(T[] replace) ¶#
-
Set the namespace prefix of this node (may be null)
- T[] name() ¶#
-
Return the vanilla node name (sans prefix)
- Node name(T[] replace) ¶#
-
Set the vanilla node name (sans prefix)
- T[] value() ¶#
-
Return the data content, which may be null
- void value(T[] val) ¶#
-
Set the raw data content, which may be null
- T[] toString(T[] output = null) ¶#
-
Return the full node name, which is a combination
of the prefix & local names. Nodes without a prefix
will return local-name only
- uint position() ¶#
-
Return the index of this node, or how many
prior siblings it has.
Time complexity: O(n)
- Node detach() ¶#
-
Detach this node from its parent and siblings
- XmlPath!(T).NodeSet query() [final] ¶#
-
Return an xpath handle to query this node
See also Document.query
- Visitor children() ¶#
-
Return a foreach iterator for node children
- Visitor attributes() ¶#
-
Return a foreach iterator for node attributes
- bool hasAttributes() [deprecated] ¶#
-
Returns whether there are attributes present or not
use node.attributes.exist instead
- bool hasChildren() [deprecated] ¶#
-
Returns whether there are children present or nor
use node.child or node.children.exist
instead
- Node copy(Node tree) ¶#
-
Duplicate the given sub-tree into place as a child
of this node.
Returns a reference to the subtree
- Node move(Node tree) ¶#
-
Relocate the given sub-tree into place as a child
of this node.
Returns a reference to the subtree
- Node element(T[] prefix, T[] local, T[] value = null) ¶#
-
Appends a new (child) Element and returns a reference
to it.
- Node attribute(T[] prefix, T[] local, T[] value = null) ¶#
-
Attaches an Attribute and returns this, the host
- Node data(T[] data) ¶#
-
Attaches a Data node and returns this, the host
- Node cdata(T[] cdata) ¶#
-
Attaches a CData node and returns this, the host
- Node comment(T[] comment) ¶#
-
Attaches a Comment node and returns this, the host
- Node doctype(T[] doctype) ¶#
-
Attaches a Doctype node and returns this, the host
- Node pi(T[] pi) ¶#
-
Attaches a PI node and returns this, the host
- Node element_(T[] prefix, T[] local, T[] value = null) [private] ¶#
-
Attaches a child Element, and returns a reference
to the child
- Node attribute_(T[] prefix, T[] local, T[] value = null) [private] ¶#
-
Attaches an Attribute, and returns the host
- Node data_(T[] data) [private] ¶#
-
Attaches a Data node, and returns the host
- Node cdata_(T[] cdata) [private] ¶#
-
Attaches a CData node, and returns the host
- Node comment_(T[] comment) [private] ¶#
-
Attaches a Comment node, and returns the host
- Node pi_(T[] pi, T[] patch) [private] ¶#
-
Attaches a PI node, and returns the host
- Node doctype_(T[] doctype) [private] ¶#
-
Attaches a Doctype node, and returns the host
- void attrib(Node node) [private] ¶#
-
Append an attribute to this node, The given attribute
cannot have an existing parent.
- void append(Node node) [private] ¶#
-
Append a node to this one. The given node cannot
have an existing parent.
- void prepend(Node node) [private] ¶#
-
Prepend a node to this one. The given node cannot
have an existing parent.
- Node set(T[] prefix, T[] local) [private] ¶#
-
Configure node values
- Node create(XmlNodeType type, T[] value) [private] ¶#
-
Creates and returns a child Element node
- Node remove() [private] ¶#
-
Detach this node from its parent and siblings
- Node patch(T[] text) [private] ¶#
-
Patch the serialization text, causing DocPrinter
to ignore the subtree of this node, and instead
emit the provided text as raw XML output.
this function does *not* copy the provided
text, and may be removed from future revisions
- Node mutate() [private] ¶#
-
purge serialization cache for this node and its
ancestors
- Node dup() [private] ¶#
-
Duplicate a single node
- Node clone() [private] ¶#
-
Duplicate a subtree
- void migrate(Document host) [private] ¶#
-
Reset the document host for this subtree