Android Utililty Methods XmlPullParser Create

List of utility methods to do XmlPullParser Create

Description

The list of methods to do XmlPullParser Create are organized into topic(s).

Method

XmlPullParsergetXmlPullParser(String xml)
Get a default XmlPullParser
XmlPullParserFactory xppFactory = XmlPullParserFactory
        .newInstance();
xppFactory.setNamespaceAware(false);
XmlPullParser parser = xppFactory.newPullParser();
parser.setInput(new StringReader(xml));
parser.nextTag();
return parser;
XmlPullParsermakeInstanceFromUrl(Context context, URL url)
make Instance From Url
return makeInstanceFromUrl(context, url,
        url.getFile().replaceAll("^.*/", ""));
XmlPullParsermakeInstanceFromUrl(Context context, URL url, String filename)
make Instance From Url
try {
    long modified = context.getFileStreamPath(filename)
            .lastModified() + TimeZone.getDefault().getRawOffset();
    long now = Calendar.getInstance().getTimeInMillis()
            + TimeZone.getDefault().getRawOffset();
    modified -= modified % 86400000L;
    now -= now % 86400000L;
    if (modified < now)
...
XmlPullParsergetPullParserFromAssert(Context context, String fileName, String encoding)
get Pull Parser From Assert
return getPullParser(
        context.getAssets().open(fileName, Context.MODE_PRIVATE),
        encoding);
XmlPullParsergetPullParserFromClass( ClassLoader classLoader, String fileName, String encoding)
get Pull Parser From Class
return getPullParser(classLoader.getResourceAsStream(fileName),
        encoding);