Top Description Methods
javax.xml.xpath

public Interface XPathNodes

extends Iterable<Node>
Known Direct Implementers
com.sun.org.apache.xpath.internal.jaxp.XPathNodesImpl
Imports
java.util.Iterator, org.w3c.dom.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

Method Summary

Modifier and TypeMethod and Description
public Node

Returns:

The Node at the specified position.
get
(int
Index of the element to return.
index
)

Returns a Node at the specified position

public Iterator<Node>

Returns:

an Iterator.
iterator
()

Redeclares java.lang.Iterable.iterator.

Returns an iterator of the Nodes.

public int

Returns:

The number of items in the result
size
()

Returns the number of items in the result

Inherited from java.lang.Iterable:
forEachspliterator

Method Detail

getback to summary
public Node get(int index) throws XPathException

Returns a Node at the specified position

Parameters
index:int

Index of the element to return.

Returns:Node

The Node at the specified position.

Exceptions
XPathException:
If the index is out of range (index < 0 || index >= size())
iteratorback to summary
public Iterator<Node> iterator()

Redeclares java.lang.Iterable.iterator.

Returns an iterator of the Nodes.

Returns:Iterator<Node>

an Iterator.

Annotations
@Override
sizeback to summary
public int size()

Returns the number of items in the result

Returns:int

The number of items in the result