summaryrefslogtreecommitdiff
path: root/xmllint.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2005-06-15 13:27:56 +0000
committerDaniel Veillard <veillard@src.gnome.org>2005-06-15 13:27:56 +0000
commit81562d2d66096c43d5ea3ff180063782e4b5a23d (patch)
tree2b68a0625f63c09b7afd509714e71cfeaf20b96c /xmllint.c
parentc63fbbff72da458dd509402a56d441fb21593fe7 (diff)
downloadlibxml2-81562d2d66096c43d5ea3ff180063782e4b5a23d.tar.gz
if sax1 is used and input is a file use the old API xmlParseFile()
* xmllint.c: if sax1 is used and input is a file use the old API xmlParseFile() * xmlschemas.c: cleanups * doc/* testapi.c elfgcchack.h: rebuilt to add python bindings for the new functions in Schemas. Daniel
Diffstat (limited to 'xmllint.c')
-rw-r--r--xmllint.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/xmllint.c b/xmllint.c
index 2a57385b..5ffabf56 100644
--- a/xmllint.c
+++ b/xmllint.c
@@ -1308,8 +1308,14 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
} else {
if (rectxt != NULL)
doc = xmlCtxtReadFile(rectxt, filename, NULL, options);
- else
+ else {
+#ifdef LIBXML_SAX1_ENABLED
+ if (sax1)
+ doc = xmlParseFile(filename);
+ else
+#endif /* LIBXML_SAX1_ENABLED */
doc = xmlReadFile(filename, NULL, options);
+ }
}
}