- Large resync between W3C and Gnome tree
- configure.in: 2.1.0 prerelease
- example/Makefile.am example/gjobread.c tree.h: work on
libxml1 libxml2 convergence.
- nanoftp, nanohttp.c: fixed stalled connections probs
- HTMLtree.c SAX.c : support for attribute without values in
HTML for andersca
- valid.c: Fixed most validation + namespace problems
- HTMLparser.c: start document callback for andersca
- debugXML.c xpath.c: lots of XPath fixups from Picdar Technology
- parser.h, SAX.c: serious speed improvement for large
CDATA blocks
- encoding.[ch] xmlIO.[ch]: Improved seriously saving to
different encoding
- config.h.in parser.c xmllint.c: added xmlCheckVersion()
and the LIBXML_TEST_VERSION macro
Daniel
diff --git a/xmllint.c b/xmllint.c
index 24c17f7..dcd7161 100644
--- a/xmllint.c
+++ b/xmllint.c
@@ -68,6 +68,7 @@
static int push = 0;
static int noblanks = 0;
static int testIO = 0;
+static char *encoding = NULL;
extern int xmlDoValidityCheckingDefaultValue;
extern int xmlGetWarningsDefaultValue;
@@ -499,6 +500,8 @@
#endif
if (compress)
xmlSaveFile("-", doc);
+ else if (encoding != NULL)
+ xmlSaveFileEnc("-", doc, encoding);
else
xmlDocDump(stdout, doc);
#ifdef LIBXML_DEBUG_ENABLED
@@ -531,6 +534,7 @@
int i, count;
int files = 0;
+ LIBXML_TEST_VERSION
for (i = 1; i < argc ; i++) {
#ifdef LIBXML_DEBUG_ENABLED
if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug")))
@@ -593,6 +597,11 @@
(!strcmp(argv[i], "--nowarning"))) {
xmlGetWarningsDefaultValue = 0;
}
+ else if ((!strcmp(argv[i], "-encode")) ||
+ (!strcmp(argv[i], "--encode"))) {
+ i++;
+ encoding = argv[i];
+ }
else if ((!strcmp(argv[i], "-noblanks")) ||
(!strcmp(argv[i], "--noblanks"))) {
noblanks++;
@@ -613,6 +622,11 @@
argv[0]);
}
for (i = 1; i < argc ; i++) {
+ if ((!strcmp(argv[i], "-encode")) ||
+ (!strcmp(argv[i], "--encode"))) {
+ i++;
+ continue;
+ }
if (argv[i][0] != '-') {
if (repeat) {
for (count = 0;count < 100 * repeat;count++)