NodeList

Overview

NodeList is a class in Aspose.Words FOSS for Java. Inherits from: Iterable<T>.

Represents a collection of nodes matching an XPath query executed using the CompositeNode.selectNodes() method.

Edition status of its 5 listed members (a property and its accessor methods are listed separately, overloads once): 5 not yet exercised by a verified example.

This class declares 4 methods for NodeList objects in Java programs. Available methods include: get, getCount, iterator, toArray. Public members are accessible to any Java application after installing the Aspose.Words FOSS for Java package. Properties: count.

Properties

NameTypeAccessDescription
countintReadGets the number of nodes in the list.

Methods

SignatureDescription
get(index: int) → NodeRetrieves a node at the given index.
getCount() → intGets the number of nodes in the list.
toArray() → Node[]Copies all nodes from the collection to a new array of nodes.
iterator() → IteratorProvides a simple “foreach” style iteration over the collection of nodes.

See Also