Modifier and Type | Method and Description |
---|---|
static Element |
nextAncestorElement(Node node)
Returns the next ancestor that is an element, or null if there is none.
|
static Element |
nextElement(Node n,
String name,
boolean deeply)
Returns the next element in document order; or null if n is null, or the document
has no more elements.
|
static Node |
nextNode(Node n,
boolean deeply)
Returns the next node in document order; or null if n is null, or the document has
no more nodes.
|
public static Element nextAncestorElement(Node node)
public static Element nextElement(Node n, String name, boolean deeply)
n
- the reference node, which may be null.name
- the tag name to restrict the search to, or null to search for
elements of any tag name.deeply
- whether to recurse into child nodes, if any.public static Node nextNode(Node n, boolean deeply)
n
- the reference node, which may be null.deeply
- whether to recurse into child nodes, if any. Calling
nextNode(n,true)
is equivalent to
org.w3c.dom.traversal.TreeWalker.nextNode.