I have a whole bunch of XML sources that I need to read. They have no patterns and, although they are all well formed and contain nothing but strings, they also do not share the structure; some of them are only on one level, others are several, some contain duplicate blocks / records, while others contain a bunch of different blocks describing various aspects of a particular record.
I used to use javax.xml.parsers.SAXParser using a special handler for entering XML data and used it to set the fields of a user object, which was fine when I read only one thing with a fixed structure and the number of records that I knew beforehand , and no sub-keys or sub-keys. In PHP, I would read all of this in a multidimensional associated array, but Java does not seem to have the exact equivalent.
I suppose I need some kind of Map or List , but I don't understand what type or how to use it. Is there a standard Android-y way to do this?
source share