Package org.dom4j

Examples of org.dom4j.XPath.valueOf()


  public String getColumnName(int columnIndex) {
    XPath xpath = definition.getColumnNameXPath(columnIndex);

    if (xpath != null) {
      System.out.println("Evaluating column xpath: " + xpath + " value: "
          + xpath.valueOf(source));

      return xpath.valueOf(source);
    }

    return definition.getColumnName(columnIndex);
View Full Code Here


    if (xpath != null) {
      System.out.println("Evaluating column xpath: " + xpath + " value: "
          + xpath.valueOf(source));

      return xpath.valueOf(source);
    }

    return definition.getColumnName(columnIndex);
  }
View Full Code Here

            else
            {
                // create an xpath expression with namespaces and evaluate it
                XPath xpath = DocumentHelper.createXPath(pattern);
                xpath.setNamespaceURIs(namespaces);
                xpathResult = xpath.valueOf(dom4jDoc);
            }
        }
        // Payload is a Java object
        else
        {
View Full Code Here

                // This is the way we always did it before, so keep doing it that way
                // as xpath.evaluate() will return non-string results (like Doubles)
                // for some scenarios.
                if (outputType == null && singleResult)
                {
                    return xpath.valueOf(doc);
                }
               
                // TODO handle non-list cases, see
                //http://www.dom4j.org/apidocs/org/dom4j/XPath.html#evaluate(java.lang.Object)
                Object obj = xpath.evaluate(doc);
View Full Code Here

            else
            {
                // create an xpath expression with namespaces and evaluate it
                XPath xpath = DocumentHelper.createXPath(pattern);
                xpath.setNamespaceURIs(namespaces);
                xpathResult = xpath.valueOf(dom4jDoc);
            }
        }
        // Payload is a Java object
        else
        {
View Full Code Here

                // This is the way we always did it before, so keep doing it that way
                // as xpath.evaluate() will return non-string results (like Doubles)
                // for some scenarios.
                if (outputType == null && singleResult)
                {
                    return xpath.valueOf(doc);
                }

                // TODO handle non-list cases, see
                //http://www.dom4j.org/apidocs/org/dom4j/XPath.html#evaluate(java.lang.Object)
                Object obj = xpath.evaluate(doc);
View Full Code Here

    }

    protected void testXPath(Node node, String xpathExpr) throws Exception {
        try {
            XPath xpath = node.createXPath(xpathExpr);
            String value = xpath.valueOf(node);

            log("valueOf: " + xpathExpr + " is: " + value);
        } catch (Throwable e) {
            e.printStackTrace();
            assertTrue("Failed with exception: " + e, false);
View Full Code Here

                                      "/xsd:complexType/xsd:sequence" +
                                      "/xsd:element[@name='%s']/@type",
                                      method, param);
            XPath xpath = DocumentHelper.createXPath(query);
            xpath.setNamespaceURIs(ns2prefix);
            String datatype = xpath.valueOf(getDocument());
            if (datatype.equals("")) {
                datatype = null;
            }
            method2datatype.put(key, datatype);
        }
View Full Code Here

                                  "/xsd:complexType/xsd:sequence" +
                                  "/xsd:element/@name",
                                  response);
            XPath xpath = DocumentHelper.createXPath(query);
            xpath.setNamespaceURIs(ns2prefix);
            String param = xpath.valueOf(getDocument());
            if (param.equals("")) {
                param = null;
            }
            response2parameter.put(response, param);
        }
View Full Code Here

    public String getColumnName(int columnIndex) {
        XPath xpath = definition.getColumnNameXPath(columnIndex);

        if (xpath != null) {
            System.out.println("Evaluating column xpath: " + xpath + " value: "
                    + xpath.valueOf(source));

            return xpath.valueOf(source);
        }

        return definition.getColumnName(columnIndex);
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.