I am wondering if relative XPath expressions can be used in libxml2.
This is from the javax.xml.xpath API, and I would like to do something like this with libxml2:
Node widgetNode = (Node) xpath.evaluate(expression, document, XPathConstants.NODE);
With reference to an element, a relative XPath expression can now be written to select a child element:
XPath xpath = XPathFactory.newInstance().newXPath(); String expression = "manufacturer"; Node manufacturerNode = (Node) xpath.evaluate(expression, **widgetNode**, XPathConstants.NODE);
brbr source share