I've read several topic on how to read local XML file.
Most of them are using openRawResource(). However it's much more slower compared to getXML().
I wanted to use getXML for my project, it's there any way to use getXML with XMLReader.parse(), as SAX InputSource does not accept XmlResourceParser as parameter.
Edit: btw, when do the startElement endElement will be called? Is it right after XMLReader.parse? Is it possible to restart the parsing from the top when I read a certain value of attributes?
Thank you very much
If you want to use the 'getXML()'-function, you can check out this tutorial, whic show's how to use the 'XmlResourceParser'-Interface: Link
Anothet way would be if you put the XML files in the 'openRawResource'-method, which returns an 'InputStream' on a given Resource ID, which you can then pass to the normal 'SAXParser'.
You can use it(assume that you are keeping your xml in assets folder)
and then