Node

Node is the base type of all other types.

Constructors

Node other, Node deep // if(other.parent != null) // this.parent = (ParentNode)other.parent.copy(deep).getInstance(ParentNode.TYPE.getName()); // don't copy parent!

Type Functions

boolean()

Get the Boolean value of this node.

bytes()

Get a byte representation of (the string value of) this node.

copy()

Create a deep copy of this node - all child nodes will be copied as well.

Same as: Node.copy(true())

Returns: A deep copy of this node.

copy(Node deep)

Create a copy of this node. If the boolean value of deep is true, all child nodes will be copied as well.

Returns: An copy of this node.

detach()

Clear the parent node.

document()

Get the owning document node.

Returns: The Document that owns this node, or an empty nodeset if the node does not belong to a document.

equals(Node other)

next()

Get the next sibling node.

nodes()

Get a nodeset containing the child nodes of this Node, if any.

number()

Get the Number value of this node.

parent()

Get the parent node.

Returns: The parent of this node, or an empty nodeset if the node has no parent.

parent(Parent parent)

Set the parent node.

Returns: This Node.

previous()

Get the previous sibling node.

remove()

Detach this node from its parent node (if it has one).

Returns: The current (removed) node.

Same as: $current.parent().remove($current)

replace(Node replacement)

Replace this node with another in the parents set of childnodes (if this node has a parent).

Returns: The current, replaced node.

Same as: $current.parent().replace($current, $replacement)

string()

Get the String value of this Node.

See also: Language or XPath Specification, String Value

type()

Get the (name of the) type of this Node.