XML DOM childNodes Property
Definition and Usage
The childNodes property returns a NodeList of child nodes for the specified node.
Syntax
nodeObject.childNodes |
Tips and Notes
Tip: Use the NodeLists's length property to determine the number of nodes in a node list. When you know the length of a node list, you can easily loop through it and extract the values you want!
Example
The following code fragment loads "books.xml" into xmlDoc using loadXMLDoc() and displays the child nodes of the XML document:
Example
Output IE:
Output Mozilla (Firefox):
Try it yourself » |