Android XmlPullParser Value Get loadStringArrayByParser(XmlPullParser parser)

Here you can find the source of loadStringArrayByParser(XmlPullParser parser)

Description

load String Array By Parser

Declaration

public static String[] loadStringArrayByParser(XmlPullParser parser) 

Method Source Code

//package com.java2s;
import java.io.IOException;

import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;

public class Main {

    public static String[] loadStringArrayByParser(XmlPullParser parser) {
        String line;/*from  ww w  .j a  va2  s . c  o m*/
        try {
            line = parser.nextText();
            line = line.trim();
            line = line.replace("\\r\\n", " ");
            line = line.replace("\n", " ");
            String[] szStrings = line.split("[ ]+");
            return szStrings;
        } catch (XmlPullParserException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
}

Related

  1. getRequiredAttributeValue(XmlPullParser pp, String namespace, String name)
  2. getValuesMap(XmlPullParser parser)
  3. loadFloatArrayByParser(XmlPullParser parser)
  4. loadFloatByParser(XmlPullParser parser)
  5. loadIntArrayByParser(XmlPullParser parser)
  6. GetFullName(XmlPullParser reader)
  7. extractChildText(XmlPullParser paramXmlPullParser)
  8. extractFirstChildTextIgnoreRest( XmlPullParser paramXmlPullParser)
  9. optAttr(final XmlPullParser pp, final String attrName, final String defaultValue)