aboutsummaryrefslogtreecommitdiffstats
path: root/xmllint.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@redhat.com>2012-05-25 16:44:20 +0800
committerDaniel Veillard <veillard@redhat.com>2012-05-25 16:44:20 +0800
commit2e1eaca637ae1f07c5c71829e94012e27a86d88c (patch)
tree01c0dc052a39d7018bfbef6cd3b68c090c12375a /xmllint.c
parentc943f708f1853de4eb15e5a94cf0b35d108da87a (diff)
downloadandroid_external_libxml2-2e1eaca637ae1f07c5c71829e94012e27a86d88c.tar.gz
android_external_libxml2-2e1eaca637ae1f07c5c71829e94012e27a86d88c.tar.bz2
android_external_libxml2-2e1eaca637ae1f07c5c71829e94012e27a86d88c.zip
Fix xmllint --xpath node initialization
By default it's more sensible to initialize it to the document itself than the root element
Diffstat (limited to 'xmllint.c')
-rw-r--r--xmllint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmllint.c b/xmllint.c
index 40a21946..3edeccb1 100644
--- a/xmllint.c
+++ b/xmllint.c
@@ -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);