29.2 Parsing XML Documents (cont.)
- Use builder to parse document from file:
DOMDocument* doc = parser->parseURI("items.xml");
- DOMDocument describes the tree structure of the document
- To inspect the root element:
DOMNode* root = doc->getDocumentElement();
- getDocumentElement returns DOMElement
- DOMElement, along w/DOMText, and others, are derived
from DOMNode
prev
|top
|next