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 Type
    Method
    Description
    void
    Adds the node newChild to the end of the list of children of this node.
    Return a child.
    Return the parent of this node.
    void
    insertBefore(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.
    void
    Set a parent of this node.
  • Method Details

    • setParentNode

      void setParentNode(Node e)
      Set a parent of this node.
      Parameters:
      e - a node.
    • getParentNode

      Node getParentNode()
      Return the parent of this node.
      Returns:
      the parent
    • appendChild

      void appendChild(Node e)
      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

      void insertBefore(Node newChild, int index)
      Inserts the node newChild before the child index.
      Parameters:
      newChild - the node to insert
      index - the reference child index
    • removeChild

      Node removeChild(Node oldChild)
      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.