29.2 Parsing XML Documents (cont.)
- getChildNodes on root produces list of two item
elements
- To traverse DOMNodeList:
- getLength - # of nodes in list
- item w/index to get a item
- So,
DOMNodeList* nodes = root->getChildNodes();
int i = . . .;
// A # between 0 and nodes->getLength() - 1
DOMNode* child_node = nodes->item(i);
prev
|top
|next