List of utility methods to do XmlPullParser Read
Object | readThisPrimitiveValueXml( XmlPullParser parser, String tagName) read This Primitive Value Xml try { if (tagName.equals("int")) { return Integer.parseInt(parser.getAttributeValue(null, "value")); } else if (tagName.equals("long")) { return Long .valueOf(parser.getAttributeValue(null, "value")); } else if (tagName.equals("float")) { ... |
Object | readThisPrimitiveValueXml( XmlPullParser parser, String tagName) read This Primitive Value Xml try { if (tagName.equals("int")) { return Integer.parseInt(parser.getAttributeValue(null, "value")); } else if (tagName.equals("long")) { return Long .valueOf(parser.getAttributeValue(null, "value")); } else if (tagName.equals("float")) { ... |
Object | readThisPrimitiveValueXml(XmlPullParser parser, String tagName) read This Primitive Value Xml try { switch (tagName) { case "int": return Integer.parseInt(parser.getAttributeValue(null, "value")); case "long": return Long .valueOf(parser.getAttributeValue(null, "value")); ... |
HashSet | readThisSetXml(XmlPullParser parser, String endTag, String[] name) Read a HashSet object from an XmlPullParser. HashSet set = new HashSet(); int eventType = parser.getEventType(); do { if (eventType == parser.START_TAG) { Object val = readThisValueXml(parser, name); set.add(val); } else if (eventType == parser.END_TAG) { if (parser.getName().equals(endTag)) { ... |
HashSet | readThisSetXml(XmlPullParser parser, String endTag, String[] name) Read a HashSet object from an XmlPullParser. HashSet set = new HashSet(); int eventType = parser.getEventType(); do { if (eventType == parser.START_TAG) { Object val = readThisValueXml(parser, name); set.add(val); } else if (eventType == parser.END_TAG) { if (parser.getName().equals(endTag)) { ... |
HashSet | readThisSetXml(XmlPullParser parser, String endTag, String[] name) Read a HashSet object from an XmlPullParser. HashSet set = new HashSet(); int eventType = parser.getEventType(); do { if (eventType == parser.START_TAG) { Object val = readThisValueXml(parser, name); set.add(val); } else if (eventType == parser.END_TAG) { if (parser.getName().equals(endTag)) { ... |
HashSet | readThisSetXml(XmlPullParser parser, String endTag, String[] name) Read a HashSet object from an XmlPullParser. HashSet set = new HashSet(); int eventType = parser.getEventType(); do { if (eventType == parser.START_TAG) { Object val = readThisValueXml(parser, name); set.add(val); } else if (eventType == parser.END_TAG) { if (parser.getName().equals(endTag)) { ... |
String[] | readThisStringArrayXml( XmlPullParser parser, String endTag, String[] name) Read a String[] object from an XmlPullParser. int num; try { num = Integer.parseInt(parser.getAttributeValue(null, "num")); } catch (NullPointerException e) { throw new XmlPullParserException( "Need num attribute in string-array"); } catch (NumberFormatException e) { throw new XmlPullParserException( ... |
String[] | readThisStringArrayXml(XmlPullParser parser, String endTag, String[] name) Read a String[] object from an XmlPullParser. int num; try { num = Integer.parseInt(parser.getAttributeValue(null, "num")); } catch (NullPointerException e) { throw new XmlPullParserException( "Need num attribute in string-array"); } catch (NumberFormatException e) { throw new XmlPullParserException( ... |
Object | readThisValueXml(XmlPullParser parser, String[] name) read This Value Xml final String valueName = parser.getAttributeValue(null, "name"); final String tagName = parser.getName(); Object res; if (tagName.equals("null")) { res = null; } else if (tagName.equals("string")) { String value = ""; int eventType; ... |