Here you can find the source of getDoubleNodeValue(Node node)
public static double getDoubleNodeValue(Node node) throws Exception
//package com.java2s; import org.w3c.dom.Node; public class Main { public static double getDoubleNodeValue(Node node) throws Exception { return Double.parseDouble(getTextNodeValue(node)); }//from w ww . j ava 2 s .co m public static String getTextNodeValue(Node node) throws Exception { Node child; if (node != null) { if (node.hasChildNodes()) { child = node.getFirstChild(); while (child != null) { if (child.getNodeType() == Node.TEXT_NODE) { return child.getNodeValue(); } child = child.getNextSibling(); } } } return ""; } }