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 seems 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.