Examples of newXPath()


Examples of javax.xml.xpath.XPathFactory.newXPath()

  private Object evaluateXpath(String xpathExpression, QName returnType) {
    Object result = "";
    try {
      XPathFactory factory = XPathFactory.newInstance();
      XPath xpath = factory.newXPath();

      xpath.setNamespaceContext(new MyNamespaceContext());

      XPathExpression expr = xpath.compile(xpathExpression);
      Object obj = expr.evaluate(doc, returnType);
View Full Code Here

Examples of javax.xml.xpath.XPathFactory.newXPath()

        return context;
    }

    protected XPathExpression getXPath(String expression) throws XPathExpressionException {
        XPathFactory xPathFactory = XPathFactory.newInstance();
        XPath xPath = xPathFactory.newXPath();
        xPath.setNamespaceContext(
                new NamespaceContext() {
                    @Override
                    public String getNamespaceURI(String prefix) {
                        if (WSSConstants.PREFIX_DSIG.equals(prefix)) {
View Full Code Here

Examples of javax.xml.xpath.XPathFactory.newXPath()

  protected Map<String, DiagramNode> fixFlowNodePositionsIfModelFromAdonis(Document bpmnModel, Map<String, DiagramNode> elementBoundsFromBpmnDi) {
    if (isExportedFromAdonis50(bpmnModel)) {
      Map<String, DiagramNode> mapOfFixedBounds = new HashMap<String, DiagramNode>();
      XPathFactory xPathFactory = XPathFactory.newInstance();
      XPath xPath = xPathFactory.newXPath();
      xPath.setNamespaceContext(new Bpmn20NamespaceContext());
      for (Entry<String, DiagramNode> entry : elementBoundsFromBpmnDi.entrySet()) {
        String elementId = entry.getKey();
        DiagramNode elementBounds = entry.getValue();
        String expression = "local-name(//bpmn:*[@id = '" + elementId + "'])";
View Full Code Here

Examples of net.sf.saxon.xpath.XPathFactoryImpl.newXPath()

                    _compilerContext, out, source.getNamespaceContext(), _bpelNS);
            xpf.setXPathFunctionResolver(funcResolver);
            JaxpVariableResolver varResolver = new JaxpVariableResolver(_compilerContext, out);
            xpf.setXPathVariableResolver(varResolver);

            XPathEvaluator xpe = (XPathEvaluator) xpf.newXPath();
            xpe.setStaticContext(new SaxonContext(xpf.getConfiguration(), varResolver, funcResolver));
            xpe.setXPathFunctionResolver(funcResolver);
            xpe.setNamespaceContext(source.getNamespaceContext());
            xpe.compile(xpathStr);
        } catch (XPathExpressionException 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.