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

it's funny. it makes the same thing's.
i remove xmlKeepBlanksDefault complet und replace the xmlParseFile function 

xmlReadFile(filename.c_str(), "UTF-8",XML_PARSE_NOBLANKS);

it makes the same.

"Daniel Veillard" <veillard redhat com> schrieb im Newsbeitrag 
news:20041102133847 GE8955 redhat com   
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 http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ 

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