/** * Creates a Jaxen {@code XPathExpression} from the given string expression and prefixes. * * @param expression the XPath expression * @param namespaces the namespaces * @return the compiled {@code XPathExpression} * @throws XPathParseException when the given expression cannot be parsed */ public static XPathExpression createXPathExpression(String expression, Map<String, String> namespaces) { try { XPath xpath = new DOMXPath(expression); xpath.setNamespaceContext(new SimpleNamespaceContext(namespaces)); return new JaxenXpathExpression(xpath, expression); } catch (JaxenException ex) { throw new org.springframework.xml.xpath.XPathParseException( "Could not compile [" + expression + "] to a XPathExpression: " + ex.getMessage(), ex); } }
/** * Creates a Jaxen {@code XPathExpression} from the given string expression and prefixes. * * @param expression the XPath expression * @param namespaces the namespaces * @return the compiled {@code XPathExpression} * @throws XPathParseException when the given expression cannot be parsed */ public static XPathExpression createXPathExpression(String expression, Map<String, String> namespaces) { try { XPath xpath = new DOMXPath(expression); xpath.setNamespaceContext(new SimpleNamespaceContext(namespaces)); return new JaxenXpathExpression(xpath, expression); } catch (JaxenException ex) { throw new org.springframework.xml.xpath.XPathParseException( "Could not compile [" + expression + "] to a XPathExpression: " + ex.getMessage(), ex); } }
/** * Creates a Jaxen <code>XPathExpression</code> from the given string expression and prefixes. * * @param expression the XPath expression * @param namespaces the namespaces * @return the compiled <code>XPathExpression</code> * @throws XPathParseException when the given expression cannot be parsed */ public static XPathExpression createXPathExpression(String expression, Map<String, String> namespaces) { try { XPath xpath = new DOMXPath(expression); xpath.setNamespaceContext(new SimpleNamespaceContext(namespaces)); return new JaxenXpathExpression(xpath); } catch (JaxenException ex) { throw new org.springframework.xml.xpath.XPathParseException( "Could not compile [" + expression + "] to a XPathExpression: " + ex.getMessage(), ex); } }
/** * Creates a Jaxen {@code XPathExpression} from the given string expression. * * @param expression the XPath expression * @return the compiled {@code XPathExpression} * @throws XPathParseException when the given expression cannot be parsed */ static XPathExpression createXPathExpression(String expression) { try { XPath xpath = new DOMXPath(expression); return new JaxenXpathExpression(xpath, expression); } catch (JaxenException ex) { throw new org.springframework.xml.xpath.XPathParseException( "Could not compile [" + expression + "] to a XPathExpression: " + ex.getMessage(), ex); } }
/** * Creates a Jaxen {@code XPathExpression} from the given string expression. * * @param expression the XPath expression * @return the compiled {@code XPathExpression} * @throws XPathParseException when the given expression cannot be parsed */ static XPathExpression createXPathExpression(String expression) { try { XPath xpath = new DOMXPath(expression); return new JaxenXpathExpression(xpath, expression); } catch (JaxenException ex) { throw new org.springframework.xml.xpath.XPathParseException( "Could not compile [" + expression + "] to a XPathExpression: " + ex.getMessage(), ex); } }
/** * Creates a Jaxen <code>XPathExpression</code> from the given string expression. * * @param expression the XPath expression * @return the compiled <code>XPathExpression</code> * @throws XPathParseException when the given expression cannot be parsed */ static XPathExpression createXPathExpression(String expression) { try { XPath xpath = new DOMXPath(expression); return new JaxenXpathExpression(xpath); } catch (JaxenException ex) { throw new org.springframework.xml.xpath.XPathParseException( "Could not compile [" + expression + "] to a XPathExpression: " + ex.getMessage(), ex); } }