I´m trying to use spring android to parse an xml that looks like that on my android code (to serialize/deserialize objects streaming from server and/or send them in post to the REST service):
<ROOT>
<USERNAME>user</USERNAME>
<INFOTYPE></INFOTYPE>
<DATA format='xml_field'>
<field name='field_id1'>1000</field>
<field name='field_id2'>xxx</field>
</DATA>
</ROOT>
I don´t know if it would be possible, but I really like this tool (spring android).
However, I would accept any easy solution that addresses my issue.
ps: I've already read other threads like this: Unmarshalling XML files into Java objects in Android? and at the moment this looks like the best solution for my case: http://simple.sourceforge.net.
The Spring reference basically answers your question:
The easy way is to just pick up this suggestion and go with Simple. I've used it a couple of times myself and it's very easy to set up and has a fairly straightforward way of declaring the hierarchy using Java POJOs. (On a side note: I still prefer JSON though. :))
Alternatively it wouldn't require a lot of effort to implement (de)serializing using SAX, provided your xml structures are as simple as your example. This option will probably keep your code more compact.