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
<[EMAIL PROTECTED] To:
[email protected]
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.
- XPath and setValue Keith Rogers
- david_n_bertoni
