Android Question XML Parsing without events?

Indy

Active Member
Licensed User
Longtime User
Hi All,

I have searched everywhere on the forums but still cannot find a way of using XMLSAX or XOM to parse an XML but not events. You maybe wondering why I want to do this, anser is simple - Reusable code. I have already used the XMLSAX events to extract values but, find the code soon gets large and messy with so many "if" statements. For this reason I decided that I need to make the code more generic so it's implmented once but, can be called many times.

I have spent quite a bit of time looking/reading many posts but cannot see any examples. Therefore I have reconciled to the fact that this is not possible. So, before I go down the route of writing my own function, I thought I'd ask the community if there's something I haven't spotted.

Thank you.
 

Indy

Active Member
Licensed User
Longtime User
You can implement the code in a class and reuse it. It doesn't matter whether the library raises events or not.

Ok. Would you happen to have a link of any example code I can look at? Having looked at the help on XOM it's not very apparent which method would suit my requirement.

Thanks
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…