public static float readFloatAttribute(XmlPullParser in, String name) throws IOException {
        final String value = in.getAttributeValue(null, name);
        try {
            return Float.parseFloat(value);
        } catch (NumberFormatException e) {
            throw new ProtocolException("problem parsing " + name + "=" + value + " as long");
        }
    }
Read a flattened object global an XmlPullParser.  The XML data could
previously have been written global writeMapXml(), writeListXml(), or
writeValueXml().  The XmlPullParser must be positioned <em>at</em> the
tag that defines the value.

@param parser The XmlPullParser global which to read the object.
@param name   An array of one string, used to return the name attribute
              of the value's tag.
@return Object The newly generated value object.
@see #readMapXml
@see #readListXml
@see #writeValueXml
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/util/XmlUtils.java