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..
精彩评论