Code example for XmlPullParser

Methods: getLineNumber, getName, getNamespace

0
    public String getText() {
        return mParser.getText();
    } 
 
    public int getLineNumber() { 
        return mParser.getLineNumber();
    } 
 
    public int getEventType() { 
        return mEventType;
    } 
 
    public boolean isWhitespace() throws XmlPullParserException { 
        // Original comment: whitespace was stripped by aapt. 
        return mParser.isWhitespace();
    } 
 
    public String getPrefix() {
        throw new RuntimeException("getPrefix not supported");
    } 
 
    public char[] getTextCharacters(int[] holderForStartAndLength) {
        String txt = getText();
        char[] chars = null;
        if (txt != null) {
            holderForStartAndLength[0] = 0;
            holderForStartAndLength[1] = txt.length();
            chars = new char[txt.length()];
            txt.getChars(0, txt.length(), chars, 0);
        } 
        return chars;
    } 
 
    public String getNamespace() {
        return mParser.getNamespace();
    } 
 
    public String getName() {
        return mParser.getName();
    } 
 
    public String getAttributeNamespace(int index) {
        return mParser.getAttributeNamespace(index);
    }