开发者

How to change a property field in a xml file with java

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 wi开发者_开发问答th 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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜