mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-27 12:15:34 +03:00
Fix xmllint --xpath node initialization
By default it's more sensible to initialize it to the document itself than the root element
This commit is contained in:
@@ -2139,7 +2139,7 @@ static void doXPathQuery(xmlDocPtr doc, const char *query) {
|
|||||||
progresult = XMLLINT_ERR_MEM;
|
progresult = XMLLINT_ERR_MEM;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ctxt->node = xmlDocGetRootElement(doc);
|
ctxt->node = (xmlNodePtr) doc;
|
||||||
res = xmlXPathEval(BAD_CAST query, ctxt);
|
res = xmlXPathEval(BAD_CAST query, ctxt);
|
||||||
xmlXPathFreeContext(ctxt);
|
xmlXPathFreeContext(ctxt);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user