Interface Node
- All Known Implementing Classes:
ElementNode,TextNode
@OpenApiAll
public interface Node
The Node interface is the primary data type for the entire Document Object Model. It represents a single node
in the document tree.
- Since:
- Jun 1, 2009
-
Method Summary
Modifier and TypeMethodDescriptionvoidappendChild(Node e) Adds the node newChild to the end of the list of children of this node.Return a child.Return the parent of this node.voidinsertBefore(Node newChild, int index) Inserts the node newChild before the child index.removeChild(Node oldChild) Removes the child node indicated by oldChild from the list of children, and returns it.voidSet a parent of this node.
-
Method Details
-
setParentNode
Set a parent of this node.- Parameters:
e- a node.
-
getParentNode
Node getParentNode()Return the parent of this node.- Returns:
- the parent
-
appendChild
Adds the node newChild to the end of the list of children of this node.- Parameters:
e- a child element
-
getChildNodes
Collection<Node> getChildNodes()Return a child.- Returns:
- the child
-
insertBefore
Inserts the node newChild before the child index.- Parameters:
newChild- the node to insertindex- the reference child index
-
removeChild
Removes the child node indicated by oldChild from the list of children, and returns it.- Parameters:
oldChild- The node being removed.- Returns:
- the node removed.
-