I'm having a hard time parsing multiple different XML files on Android using the built-in SAX parser.
Nate and Aron Saunders have helped me with the right approach to this problem but I struggle with implementing it. You can read about it here.
I have ten different XML files.
Example ResponseOne
.
<?xml version="1.0" encoding="UTF-8"?>
<ResponseOne>
<InnerTag Id="1">
</InnerTag>
</ResponseOne>
Example ResponseTwo
.
<?xml version="1.0" encoding="UTF-8"?>
<ResponseTwo>
<AnotherInnerTag State="2">
</AnotherInnerTag>
</ResponseTwo>
And so on. Every root tag is different. Now I know that I could branch the parser to trigger a different event on every root tag but I'm not quite sure I know how exactly do achieve this.
How would I tell my SAX handler that he should parse for AnotherInnerTag
with its attributes based on the root tag?