Code examples for XmlPullParser

Codota analyzed 7,668,838 open source code samples to find the most common, credible and clear examples.
You can now enable Codota on your own code to easily search and navigate your Java codebase.
659:	assertEquals(2, parser.getNamespaceCount(1)); 
-
662:	assertNull(parser.getNamespacePrefix(0)); 
663:	assertEquals("ns:default", parser.getNamespaceUri(0)); 
-
665:	assertEquals("n1", parser.getNamespacePrefix(1)); 
666:	assertEquals("ns:1", parser.getNamespaceUri(1)); 
-
668:	assertEquals("ns:default", parser.getNamespace(null)); 
Full Snippet Info
8
CodeRank
484:	assertEquals(XmlPullParser.DOCDECL, parser.nextToken()); 
485:	assertEquals(" foo [<!ENTITY bb \"bar baz\">]", parser.getText()); 
486:	assertNull(parser.getName()); 
487:	assertEquals(XmlPullParser.START_TAG, parser.nextToken()); 
488:	assertEquals(XmlPullParser.TEXT, parser.next()); 
489:	assertEquals("abar bazc", parser.getText()); 
490:	assertEquals(XmlPullParser.END_TAG, parser.next()); 
491:	assertEquals(XmlPullParser.END_DOCUMENT, parser.next()); 
-
534:	result.setInput(new StringReader(xml)); 
Full Snippet Info
8
CodeRank