Skip to content

Commit 1c79d6a

Browse files
committed
xml.c: fix build error
...by not using deprecated xmlKeepBlanksDefault() and xmlIndentTreeOutput Fixes: #21
1 parent bbee55b commit 1c79d6a

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

xml.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,9 @@ xml_init(const char *filename)
125125
{
126126
LIBXML_TEST_VERSION
127127

128-
/*
129-
* These two global variables have to be set before xmlReadFile()
130-
* in order for xmlSaveFormatFile() to indent properly.
131-
*/
132-
xmlKeepBlanksDefault(0);
133-
xmlIndentTreeOutput = 1;
134-
128+
/* Use XML_PARSE_NOBLANKS for xmlSaveFormatFile() to indent properly */
135129
ctx.filename = strdup(filename);
136-
ctx.doc = xmlReadFile(filename, NULL, 0);
130+
ctx.doc = xmlReadFile(filename, NULL, XML_PARSE_NOBLANKS);
137131
if (!ctx.doc) {
138132
fprintf(stderr, "warn: xmlReadFile('%s')\n", filename);
139133
}

0 commit comments

Comments
 (0)