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 Keith Rogers <k_...@yahoo.com> on 2003/11/09 22:25:11 UTC
XPath and setValue
Using an XPath expression, how can I get a XalanNode that can be updated? It seems like the resulting nodelist has nodes which are all read-only; i.e., setValue(), setNodeValue(), et al, throw XalanDOMException(NO_MODIFICATION_ALLOWED_ERR).
I'm trying to convert a sizable (MS-parser-based) app that uses XPath a *lot* to get a "live" node that is updated. My feeble brain is not seeing how to do this using Xerces/Xalan.
Re: XPath and setValue
Posted by da...@us.ibm.com.
You need to use the Xerces DOM to do this. Xalan-C's default
implementation of the source tree does not allow modification. There are
sample which show how you can wrap the Xerces DOM for use with Xalan. Be
warned, however, that making modification to the _structure_ of the tree is
more difficult -- when you do that, you must rebuild the entire wrapper.
You might also want to search the mailing list archives for more details.
Dave
Keith Rogers
<k_a_rogers@yaho To: xalan-c-users@xml.apache.org
o.com> cc: (bcc: David N Bertoni/Cambridge/IBM)
Subject: XPath and setValue
11/09/2003 01:25
PM
Using an XPath expression, how can I get a XalanNode that can be updated?
It seems like the resulting nodelist has nodes which are all read-only;
i.e., setValue(), setNodeValue(), et al, throw
XalanDOMException(NO_MODIFICATION_ALLOWED_ERR).
I'm trying to convert a sizable (MS-parser-based) app that uses XPath a
*lot* to get a "live" node that is updated. My feeble brain is not seeing
how to do this using Xerces/Xalan.