All of the android examples for XmlPullParser pull from a local resource file, and all of the SAX examples pull the XML from a URL. I've been told SAX is faster, so I'm trying to use that to pull data from a local resource file (res/xml/thefile.xml)
The example code I'm working off of is here. So in that example, the code I want to change is:
URL url = new URL("http://example.com/example.xml");
...
xr.parse(new InputSource(url.openStream()));
Instead of using URL
, I want to use getXml(R.xml.thefile)
Is that possible, or does SAX need to get data from a URL?