tags:

views:

30

answers:

1

I hava an xml file in the hard disk.I want at run-time my java application to change a property of the xml file.I just wondering which is the fastest and more lighter procedure? 1)parse the xml file with DOM 2)set the property value in a new document in memory 3)write the new document with the new property value back in the same file. That is what i am thinking now.Is there any way to avoid step 3 and just load the xml and change the value? Thank you in advance

A: 

On alternative is to specify the property change as an XSL transform and run it using one of the Java XSLT implementations.

Stephen C
And this can be done "on the fly"?
herc
That probably depends on the XSLT implementation ... and the exact nature of the transformation.
Stephen C
can you be more specific?i just want to change an element content
herc