[libxml2] Fix xmllint --xpath node initialization
- From: Daniel Veillard <veillard src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix xmllint --xpath node initialization
- Date: Fri, 25 May 2012 08:45:37 +0000 (UTC)
commit 2e1eaca637ae1f07c5c71829e94012e27a86d88c
Author: Daniel Veillard <veillard redhat com>
Date: Fri May 25 16:44:20 2012 +0800
Fix xmllint --xpath node initialization
By default it's more sensible to initialize it to the document itself
than the root element
xmllint.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/xmllint.c b/xmllint.c
index 40a2194..3edeccb 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]