I am trying to use Simple XML(Available here) to parse and map XML response to the DTO's for an Android application. It all works fine. However, the problem I see is that I am getting same Root Tag for all the XML's that I query from the web-services(the inner tags are different). Eg: XML 1 looks like:
<absroot>
<main>
<foo>value</foo>
//
</main>
</absroot>
XML 2 looks like:
<absroot>
<main>
<bar>value</bar>
//
</main>
</absroot>
Now AFAIK, when using Simple XML the DTO model class needs to have the same name as the Root Tag. So, how do I make class(s) for handling all the XML responses with same Root Tag? Am I missing on some detail here?
Any help is much appreciated.
No comments:
Post a Comment