Re: [xml] Re: xmlIndentTreeOutput = 1??

On Tue, Nov 02, 2004 at 01:40:52PM +0100, Thomas Rokohl wrote:
ok, i understand the problem so i try do make a workaround in my project.
i use more than one xml file and in one of them i will use 
xmlKeepBlanksDefault(0) and in
the other xmlKeepBlanksDefault(1).

so each function which use libxml looks now like this:

void functionA() {
int old = xmlKeepBlanksDefault(0);

  Do not use the global variables !
Use the new APIs xmlReadxxx like xmlReadFile and pass XML_PARSE_NOBLANKS
as one of the options instead.

my project create the xmltree by it self if the file not exist.
and now i have the effect that if the file will be create there is no 
if i read the file a second time an write in again -> it have indent?!

i also try to make

xmlSaveFormatFileEnc(filename.c_str(),doc,"UTF-8", 1);

but it not work.

so my question is: to which functions xmlKeepBlanksDefault have affection ??

  Do not touch xmlKeepBlanksDefault, it's the best.


Daniel Veillard      | Red Hat Desktop team
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]