You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by Chris Coble <cc...@sonicdesktop.com> on 2002/08/13 01:40:14 UTC

Finding nodes using Xalan, changing nodes in the non read only DOM.

Hello,
 
I'm using Xalan 1.3 to load and parse XML files, along with XPath to
find specific nodes in the data.  The app is fully C++.  What I really
want to do is the following:  Load an XML file into a DOM, find nodes in
the DOM based on XPath queries, change attributes or values in entries
returned from the XPath queries, write the new DOM back out to an XML
file.
 
What I have working now is loading the XML using Xalan and doing complex
searches using XPath with the following classes.
 
            XalanDocument
            XalanSourceTreeParserLiaison
            XalanSourceTreeDOMSupport
            XPathEvaluator
 
Since Xalan source tree implementation is read only per the spec, I
haven't found an obvious way to tie the power of XPath together with the
ability to modify the DOM.
 
Is there a way given the XalanNode to map it back to a Xerces DOM node
where the data can actually be changed? 
 
Any help is greatly appreciated.  Thanks in advance.
 
-Chris Coble
 
Sonic Desktop Software
ccoble@sonicdesktop.com