November 2002
Intermediate to advanced
1120 pages
21h 2m
English
DOM stores the lists of children of each node in NodeList objects. Example 9.13 illustrates this very basic indexed list. Indexes start from 0 and continue to the length of the list minus 1, just like Java arrays.
package org.w3c.dom;
public interface NodeList {
public Node item(int index);
public int getLength();
}
|
Instances of this interface are returned by the getChildNodes() method in the Node interface, as well as by various methods in its subinterfaces that we'll encounter in Chapter 10.
The actual data structure that backs this interface can be a linked list, an array, or something else. Details vary from implementation to implementation. Whatever the concrete data structure ...
Read now
Unlock full access