Java examples for XML:XML Attribute
get Float from XML Element attribute
//package com.java2s; import org.w3c.dom.Element; public class Main { public static float getFloat(Element element, String attributeName) { return Float.parseFloat(element.getAttribute(attributeName)); }/* w ww . jav a2 s . c o m*/ }