static double readDouble ( Node node ) { if ( node == null ) { throw new XmlException ( "Tried to read double value from null node" ) ; } String value = node . getFirstChild ( ) . getNodeValue ( ) ; if ( value == null ) { throw new XmlException ( "Tried to read double value from null value" ) ; } try { return Double . parseDouble ( value ) ; } catch ( NumberFormatException e ) { throw new XmlException ( "Expected double value, found \"" + value + "\"" , e ) ; } }
Parse a double value from the first child of the given node .