Here you can find the source of getDoubleAttributeValue(Element element, String attribute)
public static double getDoubleAttributeValue(Element element, String attribute)
//package com.java2s; import org.w3c.dom.*; public class Main { public static double getDoubleAttributeValue(Element element, String attribute) { double ret; Attr attr = element.getAttributeNode(attribute); try {/* w w w. ja v a 2s . c o m*/ ret = Double.valueOf(attr.getValue()); } catch (NumberFormatException e) { ret = 0d; } return ret; } }