Here you can find the source of loadFloatArrayByParser(XmlPullParser parser)
public static float[] loadFloatArrayByParser(XmlPullParser parser)
//package com.java2s; import java.io.IOException; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; public class Main { public static float[] loadFloatArrayByParser(XmlPullParser parser) { String line;//from w ww . j a v a 2s . com try { line = parser.nextText(); line = line.trim(); line = line.replace("\\r\\n", " "); line = line.replace("\n", " "); String[] szStrings = line.split("[ ]+"); int length = szStrings.length; float[] re = new float[length]; for (int i = 0; i < length; i++) { re[i] = Float.parseFloat(szStrings[i]); } return re; } catch (XmlPullParserException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return null; } }