public class DTMNodeList extends DTMNodeListBase
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 and Description |
|---|
DTMNodeList(DTMIterator dtmIterator)
Public constructor: Wrap a DTMNodeList around an existing and preconfigured DTMIterator
|
| Modifier and Type | Method and Description |
|---|---|
DTMIterator |
getDTMIterator()
Access the wrapped DTMIterator.
|
int |
getLength() |
Node |
item(int index) |
public DTMNodeList(DTMIterator dtmIterator)
WARNING: THIS HAS THE SIDE EFFECT OF ISSUING setShouldCacheNodes(true) AGAINST THE DTMIterator.
dtmIterator - the iterator to get the nodes frompublic DTMIterator getDTMIterator()
public Node item(int index)
item in interface NodeListitem in class DTMNodeListBasepublic int getLength()
getLength in interface NodeListgetLength in class DTMNodeListBaseCopyright © 2022–2023 HtmlUnit. All rights reserved.