if (name.equals("double")) return new Double(parser.nextText()); else if (name.equals("int") || name.equals("i4"))
if (name.equals("int") || name.equals("i4"))
    protected Object parseType(String name) throws IOException, XmlPullParserException {        if (name.equals("double"))            return new Double(parser.nextText());        else if (name.equals("int") || name.equals("i4"))            return new Integer(Integer.parseInt(parser.nextText()));        else if (name.equals("array"))            return parseArray();        else if (name.equals("string"))            return parser.nextText();        else if (name.equals("struct"))            return parseStruct();        else            throw new RuntimeException("unexpected element: " + name);    }