Code example for XmlPullParser

Methods: getAttributeNamespace

0
     * Returns the namespace of the nth attribute on the current element. 
     * 
     * @return the namespace of the nth attribute on the current element 
     */ 
    public String getAttributeNamespace(int i) {
        return mParser.getAttributeNamespace(i);
    } 
 
    /** 
     * Returns the string value of the named attribute. 
     * 
     * @param namespace the namespace of the attribute 
     * @param name the name of the attribute 
     * @param defaultValue the value to return if the attribute is not specified 
     * @return the value of the attribute 
     */ 
    public String getStringAttribute(
            String namespace, String name, String defaultValue) {
        String value = mParser.getAttributeValue(namespace, name);
        if (null == value) return defaultValue;
        return value;