Hi,
I'm writing about using XML in C++, and am briefly covering Xerces and Xalan.
I'd like to show an example of selecting a DOM node using an XPath expression
and then removing that node from the document. Unfortunately, while I've found
several ways to use XPath expressions to select a DOM node, they seem to return
nodes from a read-only view of the document. When I try to do
node->getParentNode()->removeChild(node)
I get an exception stating that the document is non-modifiable.
Is there a way to do what I'm trying to do using Xalan? If not, what's another
simple but non-trivial use of Xalan XPath expressions, outside of a stylesheet?
Best Regards,
Jonathan Turkanis