> //get the DOM representation > DOMNode *doc = parser->getDocument(); > > I can not find the getDocument method description in the provided > documentation and I am quite confused about it. Anyway, *doc is supposed to > be the DOM representation. So, what I need to do is to extract many > elements (with their childs and attributes) from a XML file, which is > supposed to be represented by *doc once it has been parsed and got. Then, > how can I assign, let's say, the value of the "nickname" element inside its > parent element "user"? getDocument returns the root node? So I guess I can > ask it for its children and then "move" through the tree with methods of > the DOMNode API, like for example, getNodeValue(), getChildNodes() and so > on. > This is just the way I use it too. For the interface of the DOM classes http://xerces.apache.org/xerces-c/ApacheDOMC++BindingL2.html is quite useful.
As far as I know it should also be possible to use XPath to navigate through the element structure. But I did not find out yet how this could be done. Sven
