Package org.jaxen

Examples of org.jaxen.XPath.numberValueOf()


    Map<QName,Function> functions,
    Map<QName,Object> variables)
      throws XPathException {
    try {
      XPath xpath = getXPath(path, namespaces, functions, variables);
      return xpath.numberValueOf(base);
    } catch (JaxenException e) {
      throw new XPathException(e);
    }
  }
 
View Full Code Here


    @Override
    public double evaluateAsDouble(String expression, Source context) throws XPathException {
        try {
            XPath xpath = createXPath(expression);
            Element element = getRootElement(context);
            return xpath.numberValueOf(element).doubleValue();
        }
        catch (JaxenException ex) {
            throw new XPathException("Could not evaluate XPath expression [" + expression + "]", ex);
        }
        catch (TransformerException ex) {
View Full Code Here

                          + e.getMessage())).initCause(e);
                }
      } else if ((formPars[i].type() instanceof Class)
           && Number.class.isAssignableFrom
           ((Class)formPars[i].type())) {
    Number n = path.numberValueOf(jdomRes);
    if (formPars[i].type().equals (Long.class)
        && !(n instanceof Long)) {
        n = new Long (n.longValue());
    }
    resData.put(formPars[i].id(), n);
View Full Code Here

                        resData.put(formPars[i].id(),
            path.stringValueOf(respPart));
                    } else if ((formPars[i].type() instanceof Class)
             && Number.class.isAssignableFrom
             ((Class)formPars[i].type())) {
                        Number n = path.numberValueOf(respPart);
                        if (formPars[i].type().equals (Long.class)
          && !(n instanceof Long)) {
                            n = new Long (n.longValue());
                        }
                        resData.put(formPars[i].id(), n);
View Full Code Here

    Map<QName,Object> variables)
      throws XPathException {
    try {
      base = getElementWrapped(base);
      XPath xpath = getXPath(path, namespaces, functions, variables);
      return xpath.numberValueOf(base);
    } catch (JaxenException e) {
      throw new XPathException(e);
    }
  }
 
View Full Code Here

        if (formPars[i].type().equals (String.class)) {
      resData.put(formPars[i].id(), path.stringValueOf(res));
        } else if ((formPars[i].type() instanceof Class)
             && Number.class.isAssignableFrom
             ((Class)formPars[i].type())) {
      Number n = path.numberValueOf(res);
      if (formPars[i].type().equals (Long.class)
          && !(n instanceof Long)) {
          n = new Long (n.longValue());
      }
      resData.put(formPars[i].id(), n);
View Full Code Here

    Map<QName,Object> variables)
      throws XPathException {
    try {
      base = getElementWrapped(base);
      XPath xpath = getXPath(path, namespaces, functions, variables);
      return xpath.numberValueOf(base);
    } catch (JaxenException e) {
      throw new XPathException(e);
    }
  }
 
View Full Code Here

                                 Map<QName, Function> functions,
                                 Map<QName, Object> variables) throws XPathException {
        try {
            base = getElementWrapped(base);
            XPath xpath = getXPath(path, namespaces, functions, variables);
            return xpath.numberValueOf(base);
        } catch (JaxenException e) {
            throw new XPathException(e);
        }
    }
View Full Code Here

    Map<QName,Function> functions,
    Map<QName,Object> variables)
      throws XPathException {
    try {
      XPath xpath = getXPath(path, namespaces, functions, variables);
      return xpath.numberValueOf(base);
    } catch (JaxenException e) {
      throw new XPathException(e);
    }
  }
 
View Full Code Here

    Map<QName,Function> functions,
    Map<QName,Object> variables)
      throws XPathException {
    try {
      XPath xpath = getXPath(path, namespaces, functions, variables);
      return xpath.numberValueOf(base);
    } catch (JaxenException e) {
      throw new XPathException(e);
    }
  }
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.