Interface XPathNodes
public interface XPathNodes extends Iterable<Node>
XPathNodes represents a set of nodes selected by a location path as specified in XML Path Language (XPath) Version 1.0, 3.3 Node-sets.
- Since:
- 9
Methods
Modifier and Type | Method | Description |
---|---|---|
Node | get(int index) | Returns a Node at the specified position |
Iterator<Node> | iterator() | Returns an iterator of the Nodes. |
int | size() | Returns the number of items in the result |
Methods declared in interface java.lang.Iterable
forEach, spliterator
Methods
iterator
Iterator<Node> iterator()
Returns an iterator of the Nodes.
size
int size()
Returns the number of items in the result
- Returns:
- The number of items in the result
get
Node get(int index) throws XPathException
Returns a Node at the specified position
- Parameters:
-
index
- Index of the element to return. - Returns:
- The Node at the specified position.
- Throws:
-
XPathException
- If the index is out of range (index < 0 || index >= size())
© 1993, 2020, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/11/docs/api/java.xml/javax/xml/xpath/XPathNodes.html