Examples of numberValueOf()


Examples of org.jaxen.XPath.numberValueOf()

    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

Examples of org.jaxen.XPath.numberValueOf()

        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

Examples of org.jaxen.XPath.numberValueOf()

    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

Examples of org.jaxen.XPath.numberValueOf()

                                 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

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

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

Examples of org.jaxen.XPath.numberValueOf()

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

Examples of org.jaxen.dom.DOMXPath.numberValueOf()

        BaseXPath xpath = new DOMXPath("1 + 2");
       
        String stringValue = xpath.stringValueOf(xpath);
        assertEquals("3", stringValue);
       
        Number numberValue = xpath.numberValueOf(xpath);
        assertEquals(3, numberValue.doubleValue(), 0.00001);
       
    }
   
   
View Full Code Here

Examples of org.jaxen.dom.DOMXPath.numberValueOf()

    public void testNumberValueOfEmptyNodeSetIsNaN() throws JaxenException {
       
        BaseXPath xpath = new DOMXPath("/x");
       
        doc.appendChild(doc.createElement("root"));
        Double numberValue = (Double) xpath.numberValueOf(doc);
        assertTrue(numberValue.isNaN());
       
    }
   
   
View Full Code Here

Examples of org.jaxen.dom.DOMXPath.numberValueOf()

        doc.appendChild(root);
        root.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns", "http://www.example.org/");
       
        DOMXPath xpath = new DOMXPath( "count(/*/@*)" );
       
        Number value = xpath.numberValueOf(doc);
        assertEquals(0, value.intValue());
       
    }

   
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.