开发者

Most efficient way to modify xml

开发者 https://www.devze.com 2023-04-10 15:49 出处:网络
I\'m writing an app that needs to modify xml documents.More precisely it need to add attributes and add/delete nodes.These documents are relatively small, 30-50K at most.From what I\'m reading the bes

I'm writing an app that needs to modify xml documents. More precisely it need to add attributes and add/delete nodes. These documents are relatively small, 30-50K at most. From what I'm reading the best way to read XML is use the SAX parser, but does that apply to modifying XML as well? The DOM parser seem开发者_如何学运维s to be the easiest to manipulate XML with, but, obviously, uses more battery and memory.

Just looking for the most efficient way (uses the least battery/memory) to manipulate XML on an Android device.


I suggest XOM - It is very memory efficient and support dual streaming/tree-based API.


The most efficient way to modify XML is to use VTD-XML(http://vtd-xml.sf.net)...it is the only way to do so called incremental update..

0

精彩评论

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

关注公众号