Android XmlPullParser Value Get loadFloatByParser(XmlPullParser parser)

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

Description

load Float By Parser

Declaration

public static float loadFloatByParser(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 float loadFloatByParser(XmlPullParser parser) {
        String line;/*from   w w  w.  j a v  a 2  s.  c o m*/
        try {
            line = parser.nextText();
            line = line.trim();
            return Float.parseFloat(line);
        } catch (XmlPullParserException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return (Float) null;
    }
}

Related

  1. getPITarget(XmlPullParser pp)
  2. getRequiredAttributeValue(XmlPullParser pp, String namespace, String name)
  3. getRequiredAttributeValue(XmlPullParser pp, String namespace, String name)
  4. getValuesMap(XmlPullParser parser)
  5. loadFloatArrayByParser(XmlPullParser parser)
  6. loadIntArrayByParser(XmlPullParser parser)
  7. loadStringArrayByParser(XmlPullParser parser)
  8. GetFullName(XmlPullParser reader)
  9. extractChildText(XmlPullParser paramXmlPullParser)