1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 12:25:09 +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:
Daniel Veillard 2012-05-25 16:44:20 +08:00
parent c943f708f1
commit 2e1eaca637

View File

@ -2139,7 +2139,7 @@ static void doXPathQuery(xmlDocPtr doc, const char *query) {
progresult = XMLLINT_ERR_MEM;
return;
}
ctxt->node = xmlDocGetRootElement(doc);
ctxt->node = (xmlNodePtr) doc;
res = xmlXPathEval(BAD_CAST query, ctxt);
xmlXPathFreeContext(ctxt);