Top Description Constructors Methods
com.sun.org.apache.xml.internal.dtm.ref

public Class DTMNodeListBase

extends Object
implements NodeList
Class Inheritance
All Implemented Interfaces
org.w3c.dom.NodeList
Known Direct Subclasses
com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIterNodeList, com.sun.org.apache.xml.internal.dtm.ref.DTMChildIterNodeList, com.sun.org.apache.xml.internal.dtm.ref.DTMNodeList
Imports
org.w3c.dom.Node

DTMNodeList gives us an implementation of the DOM's NodeList interface wrapped around a DTM Iterator. The author considers this something of an abominations, since NodeList was not intended to be a general purpose "list of nodes" API and is generally considered by the DOM WG to have be a mistake... but I'm told that some of the XPath/XSLT folks say they must have this solution. Please note that this is not necessarily equivlaent to a DOM NodeList operating over the same document. In particular:

State: In progress!!

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int
getLength()

Implements org.w3c.dom.NodeList.getLength.

The number of nodes in the list.

public Node

Returns:

The node at the indexth position in the NodeList, or null if that is not a valid index.
item
(int
Index into the collection.
index
)

Implements org.w3c.dom.NodeList.item.

Returns the indexth item in the collection.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

DTMNodeListBaseback to summary
public DTMNodeListBase()

Method Detail

getLengthback to summary
public int getLength()

Implements org.w3c.dom.NodeList.getLength.

The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.

itemback to summary
public Node item(int index)

Implements org.w3c.dom.NodeList.item.

Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.

Parameters
index:int

Index into the collection.

Returns:Node

The node at the indexth position in the NodeList, or null if that is not a valid index.