> Hello,
>  I am using Xalan in application that needs to
>    1. evaluate an XPath expression on document
>    2. modify the source document
>    3. repeat steps 1-2 several times.
> The problem is that parsing the source document the way it is done in
> XPath API samples gives a readonly document, so in step 3 I have to
> construct a new document and feed it back to Xalan, which makes code
> slow and complicated. Is there any way to evaluate Xpath expressions on
> a writeable document in Xalan?

I haven't found any other way than just use XSLT to add new tag or remove
the tag from XML file and then reread it in Xalan.
Or You can construct new tree right in the memory using Xalan methods.

One more way: Use Xercer (DOM) and implement Your own XPath.
If You don't need too complicated regex XPath expressions, it shouldn't be
too hard.

        Bogdan
--------------------------------------------------------------------
  "Those who would give up a little freedom for a little safety,
         deserve neither freedom nor safety." --Benjamin Franklin


Reply via email to