Lines Matching refs:node

52      * Returns the owner document of the specified node.
54 * @param node the node
57 public static Document getOwnerDocument(Node node) {
58 if (node.getNodeType() == Node.DOCUMENT_NODE) {
59 return (Document) node;
61 return node.getOwnerDocument();
112 * Returns the first child element of the specified node, or null if there
115 * @param node the node
116 * @return the first child element of the specified node, or null if there
118 * @throws NullPointerException if <code>node == null</code>
120 public static Element getFirstChildElement(Node node) {
121 Node child = node.getFirstChild();
129 * Returns the last child element of the specified node, or null if there
132 * @param node the node
133 * @return the last child element of the specified node, or null if there
135 * @throws NullPointerException if <code>node == null</code>
137 public static Element getLastChildElement(Node node) {
138 Node child = node.getLastChild();
146 * Returns the next sibling element of the specified node, or null if there
149 * @param node the node
150 * @return the next sibling element of the specified node, or null if there
152 * @throws NullPointerException if <code>node == null</code>
154 public static Element getNextSiblingElement(Node node) {
155 Node sibling = node.getNextSibling();
248 * Removes all children nodes from the specified node.
250 * @param node the parent node whose children are to be removed
252 public static void removeAllChildren(Node node) {
253 NodeList children = node.getChildNodes();
255 node.removeChild(children.item(i));