Here you can find the source of getAttributeFloatValue(String attribute, NamedNodeMap namedNodeMap)
public static float getAttributeFloatValue(String attribute, NamedNodeMap namedNodeMap)
//package com.java2s; //License from project: Open Source License import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; public class Main { public static float getAttributeFloatValue(String attribute, NamedNodeMap namedNodeMap) { String value = getAttributeStringValue(attribute, namedNodeMap); if (value != null) { return Float.parseFloat(value); }/* w ww .ja v a 2 s . com*/ return 0.0f; } public static String getAttributeStringValue(String attribute, NamedNodeMap namedNodeMap) { Node node = namedNodeMap.getNamedItem(attribute); if (node != null) { return node.getTextContent(); } return null; } }