Is it possible to open an external file in Android? (As XmlPullParser)
+1
A:
See android.util.Xml
and its newPullParser()
method.
As the documentation for it indicates, XPP is not faster than SAX. Hence, unless you are a big fan of the XPP programming model, I would use SAX, just because it is more commonly used in Java.
CommonsWare
2010-05-31 16:54:58
A:
File f = new File(filePath);
reader = new FileReader(f);
XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
factory.setNamespaceAware(true);
xpp = factory.newPullParser();
xpp.setInput(reader);
That's how do I.
Solvek
2010-06-01 15:05:00