Code example for DefaultHandler

Methods: parse

0
        return new ByteArrayInputStream(mXmlBytes);
    } 
 
    private void runSax() throws IOException, SAXException { 
        long start = System.currentTimeMillis();
        Xml.parse(newInputStream(), Xml.Encoding.UTF_8, new DefaultHandler());
        long elapsed = System.currentTimeMillis() - start;
        Log.i(TAG, "expat SAX: " + elapsed + "ms");
    } 
 
    private void runExpatPullParser() throws XmlPullParserException, IOException { 
        long start = System.currentTimeMillis();
        XmlPullParser pullParser = Xml.newPullParser();
        pullParser.setInput(newInputStream(), "UTF-8");
        withPullParser(pullParser);
        long elapsed = System.currentTimeMillis() - start;
        Log.i(TAG, "expat pull: " + elapsed + "ms");
    } 
 
    private void runJavaPullParser() throws XmlPullParserException, IOException {