Here you can find the source of attributeFloat(Node node, String attributeName)
public static float attributeFloat(Node node, String attributeName)
//package com.java2s; import org.w3c.dom.Node; public class Main { public static float attributeFloat(Node node, String attributeName) { return Float.parseFloat(attributeString(node, attributeName)); }// w w w .j a v a 2s. co m public static String attributeString(Node node, String attributeName) { if (node.hasAttributes()) { Node attr = node.getAttributes().getNamedItem(attributeName); if (attr != null) { return attr.getNodeValue(); } } return null; } }