Same as {@link #asDouble(String, Node)} but allows an xpath to be passed
in explicitly for reuse.
321445
public static Double asDouble(String expression, Node node, XPath xpath)
            throws XPathExpressionException {
        String doubleString = evaluateAsString(expression, node, xpath);
        return (isEmptyString(doubleString)) ? null : Double.parseDouble(doubleString);
    }
537926
public static ByteBuffer asByteBuffer(String expression, Node node, XPath xpath)
            throws XPathExpressionException {
        String base64EncodedString = evaluateAsString(expression, node, xpath);
        if (isEmptyString(base64EncodedString)) return null;

        if (!isEmpty(node)) {
            byte[] decodedBytes = Base64.decode(base64EncodedString);
            return ByteBuffer.wrap(decodedBytes);
        }
        return null;
    }
1158798
@Nullable
  public Double getDouble(@Nonnull String field) {
    Number number = (Number) get(field);
    return number == null ? null : number.doubleValue();
  }
1111868
public int asNode(XPathContext xctxt)
          throws javax.xml.transform.TransformerException
  {
  	DTMIterator iter = execute(xctxt).iter();
    return iter.nextNode();
  }
195512
public static Node getElementB(Node node, String xPath) throws XPathExpressionException {
        XPathExpression expr = xpath.compile(xPath);
        return getElementB(node, expr);
    }
592972
public static Node asNode(String nodeName, Node node, XPath xpath)
            throws XPathExpressionException {
        if (node == null) return null;
        return (Node) xpath.evaluate(nodeName, node, XPathConstants.NODE);
    }
1309683
private boolean isElementPresentJavaXPath() throws Exception {
		String xpath = ((StringLocatorAwareBy)getByLocator()).getLocator();
		try {
			xpath = formatXPathForJavaXPath(xpath);
			NodeList nodes = getNodeListUsingJavaXPath(xpath);
			if (nodes.getLength() > 0) {
				return true;
			} else {
				return false;
			}
		} catch (Exception e) {
			throw new Exception("Error performing isElement present using Java XPath: " + xpath, e);
		}
	}
706569
@Override
	public double getDouble(String fldName) throws RemoteException {
		try {
			fldName = fldName.toLowerCase(); // to ensure case-insensitivity
			return (Double) s.getVal(fldName).castTo(DOUBLE).asJavaVal();
		} catch (RuntimeException e) {
			rconn.rollback();
			throw e;
		}
	}
87489
public Double getAsDouble(String key) {
        Object value = mValues.get(key);
        try {
            return value != null ? ((Number) value).doubleValue() : null;
        } catch (ClassCastException e) {
            if (value instanceof CharSequence) {
                try {
                    return Double.valueOf(value.toString());
                } catch (NumberFormatException e2) {
                    logger.severe("Cannot parse Double value for " + value + " at key " + key);
                    return null;
                }
            } else {
                logger.log(Level.SEVERE, "Cannot cast value for " + key + " to a Double: " + value, e);
                return null;
            }
        }
    }
343876
public double getDouble(String name)
    {
        double val = 0;
        try {
            val = Double.valueOf(request.getParameter(name));
        } catch (NumberFormatException e) {}
        
        return val;
    }
625925
public static final double getDoubleAttribute(Path path, String attribute, LinkOption... options) throws IOException
    {
        return getDoubleAttribute(path, attribute, Double.NaN, options);
    }
456135
protected static String getHumanReadableXml(final Node node) {
        StringWriter toReturn = new StringWriter();

        try {
            Transformer transformer = getFactory().newTransformer();
            transformer.setOutputProperty(OutputKeys.INDENT, "yes");
            transformer.setOutputProperty(OutputKeys.STANDALONE, "yes");
            transformer.transform(new DOMSource(node), new StreamResult(toReturn));
        } catch (TransformerException e) {
            throw new IllegalStateException("Could not transform node [" + node.getNodeName() + "] to XML", e);
        }

        return toReturn.toString();
    }
802778
public static double asDouble(Object value) {
        if (value instanceof Number) {
            return ((Number) value).doubleValue();
        } else if (value instanceof Numeric) {
            return ((Numeric) value).asInteger();
        } else if (value instanceof CharSequence) {
            try {
                return Double.parseDouble(value.toString());
            } catch (NumberFormatException nfe) {
                throw new IncompatibleValueException("Unable to parse string \"" + Strings.escape(value.toString()) +
                                                     "\" to a double", nfe);
            }
        }
        throw new IncompatibleValueException(
                "Unable to convert " + value.getClass().getSimpleName() + " to a double");
    }
1291352
public static NodeList getElementsB(Node node, String xString) throws XPathExpressionException {
        XPathExpression xPath = compileX(xString);
        return (NodeList) xPath.evaluate(node, XPathConstants.NODESET);
    }
605791
public @Nonnull Stream<String> value(String xpath) {
        return select(xpath).map(XQuery::text);
    }
165029
@Override
	public Double getPropertyDouble(Class<?> cls, String key)
	{
		return getPropertyDouble(new StringBuilder(cls.getName()).append(".").append(key).toString());

	}
609352
void writeDouble(double value) throws IOException {
        if (Double.isNaN(value) || Double.isInfinite(value)) {
            output.append('"').append(Double.toString(value)).append('"');
        } else {
            output.append(Double.toString(value));
        }
    }