diff --git a/xmllint.c b/xmllint.c index bfcd8bb2..c6758b58 100644 --- a/xmllint.c +++ b/xmllint.c @@ -2110,6 +2110,7 @@ parseAndPrintFile(const char *filename, xmlParserCtxtPtr rectxt) { #ifdef LIBXML_XPATH_ENABLED if (xpathquery != NULL) { + xmlXPathOrderDocElems(doc); doXPathQuery(doc, xpathquery); } #endif