Commit 3df01181 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

fixing bug #119264 xmllint failing to report serialization errors in some

* xmllint.c: fixing bug #119264 xmllint failing to report
  serialization errors in some cases.
Daniel
parent 18ab8721
Wed Dec 10 11:16:29 CET 2003 Daniel Veillard <daniel@veillard.com>
* xmllint.c: fixing bug #119264 xmllint failing to report
serialization errors in some cases.
Tue Dec 9 23:50:23 CET 2003 Daniel Veillard <daniel@veillard.com>
 
* entities.c: fixed an XML entites content serialization
......
......@@ -214,7 +214,7 @@ AC_ARG_ENABLE(xmltest,
enable_xmltest=yes)
if test x$xml_config_exec_prefix != x ; then
xml_config_args="$xml_config_args --exec-prefix=$xml_config_exec_prefix"
xml_config_args="$xml_config_args"
if test x${XML2_CONFIG+set} != xset ; then
XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config
fi
......
......@@ -1066,6 +1066,8 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
#endif /* LIBXML_READER_ENABLED */
#ifdef LIBXML_OUTPUT_ENABLED
if (noout == 0) {
int ret;
/*
* print it.
*/
......@@ -1144,14 +1146,25 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
}
else if (encoding != NULL) {
if ( format ) {
xmlSaveFormatFileEnc(output ? output : "-", doc, encoding, 1);
ret = xmlSaveFormatFileEnc(output ? output : "-", doc,
encoding, 1);
}
else {
xmlSaveFileEnc(output ? output : "-", doc, encoding);
ret = xmlSaveFileEnc(output ? output : "-", doc, encoding);
}
if (ret < 0) {
fprintf(stderr, "failed save to %s\n",
output ? output : "-");
progresult = 6;
}
}
else if (format) {
xmlSaveFormatFile(output ? output : "-", doc, 1);
ret = xmlSaveFormatFile(output ? output : "-", doc, 1);
if (ret < 0) {
fprintf(stderr, "failed save to %s\n",
output ? output : "-");
progresult = 6;
}
}
else {
FILE *out;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment