List of utility methods to do XmlPullParser Read
String | readStringAttribute(XmlPullParser in, String name) read String Attribute return in.getAttributeValue(null, name);
|
String | readText(XmlPullParser parser) read Text String value = null; while (parser.next() != XmlPullParser.END_TAG) { if (parser.getEventType() == XmlPullParser.END_DOCUMENT) { throw new XmlPullParserException( "reached unexpected end of document"); } else if (parser.getEventType() != XmlPullParser.TEXT) { continue; String text = parser.getText(); value = textOf(text); return value; |
String | readText(XmlPullParser parser) read Text String result = ""; if (parser.next() == XmlPullParser.TEXT) { result = parser.getText(); parser.nextTag(); return result; |
String | readText(XmlPullParser parser) read Text String result = ""; if (parser.next() == XmlPullParser.TEXT) { result = parser.getText(); parser.nextTag(); return result; |
String | readText(XmlPullParser parser) read Text String result = ""; if (parser.next() == XmlPullParser.TEXT) { result = parser.getText(); parser.nextTag(); return result; |
String | readText(XmlPullParser parser, String tagName) Reads a String from the next xml tag String result = ""; parser.require(XmlPullParser.START_TAG, NAMESPACE, tagName); if (parser.next() == XmlPullParser.TEXT) { result = parser.getText(); parser.nextTag(); parser.require(XmlPullParser.END_TAG, NAMESPACE, tagName); return result; ... |
double[] | readThisDoubleArrayXml( XmlPullParser parser, String endTag, String[] name) Read a double[] object from an XmlPullParser. int num; try { num = Integer.parseInt(parser.getAttributeValue(null, "num")); } catch (NullPointerException e) { throw new XmlPullParserException( "Need num attribute in double-array"); } catch (NumberFormatException e) { throw new XmlPullParserException( ... |
double[] | readThisDoubleArrayXml(XmlPullParser parser, String endTag, String[] name) Read a double[] object from an XmlPullParser. int num; try { num = Integer.parseInt(parser.getAttributeValue(null, "num")); } catch (NullPointerException e) { throw new XmlPullParserException( "Need num attribute in double-array"); } catch (NumberFormatException e) { throw new XmlPullParserException( ... |
int[] | readThisIntArrayXml(XmlPullParser parser, String endTag, String[] name) Read an int[] object from an XmlPullParser. int num; try { num = Integer.parseInt(parser.getAttributeValue(null, "num")); } catch (NullPointerException e) { throw new XmlPullParserException( "Need num attribute in byte-array"); } catch (NumberFormatException e) { throw new XmlPullParserException( ... |
int[] | readThisIntArrayXml(XmlPullParser parser, String endTag, String[] name) Read an int[] object from an XmlPullParser. int num; try { num = Integer.parseInt(parser.getAttributeValue(null, "num")); } catch (NullPointerException e) { throw new XmlPullParserException( "Need num attribute in byte-array"); } catch (NumberFormatException e) { throw new XmlPullParserException( ... |