Examples of stringValueOf()


Examples of org.intellij.plugins.xpathView.support.jaxen.PsiXPath.stringValueOf()

        mappingExp + ">", e);
    }

    try
    {
      return xPath.stringValueOf(xmlTag);
    }
    catch (JaxenException e)
    {
      throw new XMappingException("Error while evaluating value. Mapping expression : <"
        + mappingExp + ">. Xml content : <" + xmlTag.getText() + ">", e);
View Full Code Here

Examples of org.jaxen.BaseXPath.stringValueOf()

   
    public void testSelectSingleNodeForContext() throws JaxenException {
       
        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.BaseXPath.stringValueOf()

    public void testValueOfEmptyListIsEmptyString() throws JaxenException {
       
        BaseXPath xpath = new DOMXPath("/element");
        doc.appendChild(doc.createElement("root"));
       
        String stringValue = xpath.stringValueOf(doc);
        assertEquals("", stringValue);
       
    }

    public void testAllNodesQuery() throws JaxenException {
View Full Code Here

Examples of org.jaxen.XPath.stringValueOf()

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

Examples of org.jaxen.XPath.stringValueOf()

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

Examples of org.jaxen.XPath.stringValueOf()

                    resData.put(formPars[i].id(),
        convertToSax(respPart.getDocumentElement()));
                } else {
                    if (formPars[i].type().equals (String.class)) {
                        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)
View Full Code Here

Examples of org.jaxen.XPath.stringValueOf()

        logger.error (msg, e);
        throw new CannotExecuteException (msg);
    }
      }
      if (formPars[i].type().equals(String.class)) {
    String value = path.stringValueOf(jdomRes);
    if (logger.isDebugEnabled()) {
        logger.debug("value = " + value);
    }
    resData.put(formPars[i].id(), value);
            } else if (formPars[i].type().equals(Date.class)) {
View Full Code Here

Examples of org.jaxen.XPath.stringValueOf()

    if (logger.isDebugEnabled()) {
        logger.debug("value = " + value);
    }
    resData.put(formPars[i].id(), value);
            } else if (formPars[i].type().equals(Date.class)) {
                String sval = path.stringValueOf(jdomRes);
                try {
                    Date value = XMLUtil.parseXsdDateTime(sval);
                    if (logger.isDebugEnabled()) {
                        logger.debug("value = " + value);
                    }
View Full Code Here

Examples of org.jaxen.XPath.stringValueOf()

                        (new CannotExecuteException
                         ("Problem parsing " + sval + " as xsd datetime: "
                          + e.getMessage())).initCause(e);
                }
            } else if (formPars[i].type().equals(Double.class)) {
                String sval = path.stringValueOf(jdomRes);
                try {
                    double value = XMLUtil.parseXsdDouble(sval);
                    if (logger.isDebugEnabled()) {
                        logger.debug("value = " + value);
                    }
View Full Code Here

Examples of org.jaxen.XPath.stringValueOf()

                        (new CannotExecuteException
                         ("Problem parsing " + sval + " as xsd double: "
                          + e.getMessage())).initCause(e);
                }
            } else if (formPars[i].type().equals(Boolean.class)) {
                String sval = path.stringValueOf(jdomRes);
                try {
                    boolean value = XMLUtil.parseXsdBoolean(sval);
                    if (logger.isDebugEnabled()) {
                        logger.debug("value = " + value);
                    }
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.