Android Utililty Methods XmlPullParser Read

List of utility methods to do XmlPullParser Read

Description

The list of methods to do XmlPullParser Read are organized into topic(s).

Method

ObjectreadThisPrimitiveValueXml( 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")) {
...
ObjectreadThisPrimitiveValueXml( 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")) {
...
ObjectreadThisPrimitiveValueXml(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"));
...
HashSetreadThisSetXml(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)) {
...
HashSetreadThisSetXml(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)) {
...
HashSetreadThisSetXml(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)) {
...
HashSetreadThisSetXml(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(
...
ObjectreadThisValueXml(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;
...