- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {Dictionary d =
new Hashtable()
Bundle bundle;bundle.getHeaders()
new Properties()
- Smart code suggestions by Codota
}
public static Object executeXPath(Node document, XPathExpression expr, QName result) throws XPathException, MarshallingException { try { return expr.evaluate(document, result); } catch (Exception e) { throw new MarshallingException("Exception unmarshalling XML.", e); } } }
/** * Executes the given {@link XPathExpression} and returns the result with the type specified. */ public static Object executeXPath(Node document, XPathExpression expr, QName result) throws XPathException, MarshallingException { try { return expr.evaluate(document, result); } catch (Exception e) { throw new MarshallingException("Exception unmarshalling XML.", e); } } }
/** * Executes the given {@link XPathExpression} and returns the result with the type specified. */ public static Object executeXPath(Node document, XPathExpression expr, QName result) throws XPathException, MarshallingException { try { return expr.evaluate(document, result); } catch (Exception e) { throw new MarshallingException("Exception unmarshalling XML.", e); } } }
/** * Executes the given xpath and returns the result with the type specified. */ public static Object executeXPath(Node document, String xpathExpression, Map<String, String> namespaceMapping, QName result) throws XPathException, MarshallingException { NamespaceMapContext mapContext = new NamespaceMapContext(namespaceMapping); try { XPathFactory xPathfactory = XPathFactory.newInstance(); XPath xpath = xPathfactory.newXPath(); xpath.setNamespaceContext(mapContext); XPathExpression expr = xpath.compile(xpathExpression); return executeXPath(document, expr, result); } catch (XPathExpressionException e) { throw new XPathException("Xpath(" + xpathExpression + ") cannot be compiled", e); } catch (Exception e) { throw new MarshallingException("Exception unmarshalling XML.", e); } }
public static Object executeXPath(Node document, String xpathExpression, Map<String, String> namespaceMapping, QName result) throws XPathException, MarshallingException { NamespaceMapContext mapContext = new NamespaceMapContext(namespaceMapping); try { XPathFactory xPathfactory = XPathFactory.newInstance(); XPath xpath = xPathfactory.newXPath(); xpath.setNamespaceContext(mapContext); XPathExpression expr = xpath.compile(xpathExpression); return executeXPath(document, expr, result); } catch (XPathExpressionException e) { throw new XPathException("Xpath(" + xpathExpression + ") cannot be compiled", e); } catch (Exception e) { throw new MarshallingException("Exception unmarshalling XML.", e); } }
/** * Executes the given xpath and returns the result with the type specified. */ public static Object executeXPath(Node document, String xpathExpression, Map<String, String> namespaceMapping, QName result) throws XPathException, MarshallingException { NamespaceMapContext mapContext = new NamespaceMapContext(namespaceMapping); try { XPathFactory xPathfactory = XPathFactory.newInstance(); XPath xpath = xPathfactory.newXPath(); xpath.setNamespaceContext(mapContext); XPathExpression expr = xpath.compile(xpathExpression); return executeXPath(document, expr, result); } catch (XPathExpressionException e) { throw new XPathException("Xpath(" + xpathExpression + ") cannot be compiled", e); } catch (Exception e) { throw new MarshallingException("Exception unmarshalling XML.", e); } }