use of org.kxml2.io.KXmlParser in project android_frameworks_base by DirtyUnicorns.
the class Xml method newPullParser.
/**
* Returns a new pull parser with namespace support.
*/
public static XmlPullParser newPullParser() {
try {
KXmlParser parser = new KXmlParser();
parser.setFeature(XmlPullParser.FEATURE_PROCESS_DOCDECL, true);
parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
return parser;
} catch (XmlPullParserException e) {
throw new AssertionError();
}
}
use of org.kxml2.io.KXmlParser in project android_frameworks_base by AOSPA.
the class Xml method newPullParser.
/**
* Returns a new pull parser with namespace support.
*/
public static XmlPullParser newPullParser() {
try {
KXmlParser parser = new KXmlParser();
parser.setFeature(XmlPullParser.FEATURE_PROCESS_DOCDECL, true);
parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
return parser;
} catch (XmlPullParserException e) {
throw new AssertionError();
}
}
use of org.kxml2.io.KXmlParser in project android_frameworks_base by AOSPA.
the class LayoutParserWrapperTest method getParserFromString.
private static LayoutParserWrapper getParserFromString(String layoutContent) throws XmlPullParserException {
XmlPullParser parser = new KXmlParser();
parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
parser.setInput(new StringReader(layoutContent));
return new LayoutParserWrapper(parser);
}
use of org.kxml2.io.KXmlParser in project android_frameworks_base by ResurrectionRemix.
the class Xml method newPullParser.
/**
* Returns a new pull parser with namespace support.
*/
public static XmlPullParser newPullParser() {
try {
KXmlParser parser = new KXmlParser();
parser.setFeature(XmlPullParser.FEATURE_PROCESS_DOCDECL, true);
parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
return parser;
} catch (XmlPullParserException e) {
throw new AssertionError();
}
}
use of org.kxml2.io.KXmlParser in project android_frameworks_base by ResurrectionRemix.
the class ExpatPerformanceTest method runJavaPullParser.
private void runJavaPullParser() throws XmlPullParserException, IOException {
XmlPullParser pullParser;
long start = System.currentTimeMillis();
pullParser = new KXmlParser();
pullParser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
pullParser.setInput(newInputStream(), "UTF-8");
withPullParser(pullParser);
long elapsed = System.currentTimeMillis() - start;
Log.i(TAG, "java pull parser: " + elapsed + "ms");
}
Aggregations