Code example for XmlPullParserException

0
            throw new XmlPullParserException("No start tag found");
        } 
        Drawable drawable = createFromXmlInner(r, parser, attrs);
        if (drawable == null) {
            throw new RuntimeException("Unknown initial tag: " + parser.getName());
        } 
        return drawable;
    } 
 
    public static Drawable createFromXmlInner(Resources r, XmlPullParser parser, AttributeSet attrs)
            throws XmlPullParserException, IOException { 
        Drawable drawable = null;
        final String name = parser.getName();
        try { 
            Class<? extends Drawable> clazz = CLASS_MAP.get(name);
            if (clazz != null) {
                drawable = clazz.newInstance();
            } else if (name.indexOf('.') > 0) {
                drawable = (Drawable) Class.forName(name).newInstance();
            } 
        } catch (Exception e) {