RE: [libxml++] writing formatted (indented) files



> Le Vendredi 16 Mai 2003 10:06, Christophe de VIENNE a écrit :
> > > I have added the examples/dom_read_write/ test in cvs and it does
> > > demonstrate this obvious and serious problem - we are removing
> > > significant white space. Christophe, I believe you have a 
> solution for
> > > this, but I'll try to take care of it if you want me to.
> >
> > The very first thing to do is, I think, not to use 
> xmlSaveFormatFile, at
> > least the way we do (I mean setting the 'format' parameter 
> to 1 is bad).
> > I'd prefer to use xmlSaveFile(), and add a member function
> > save_to_format_file() to Document.
> > If you agree with that (I guess you will) I'll commit it today.
> >
> 
> I attached the output of your example when using 
> xmlSaveFile(). If I remember 
> well it's similar to what write_to_string produced in my first tests.

I think it still removes significant white space, compared to the original:
http://makeashorterlink.com/?R46E12694
or
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/libxmlplusplus/libxml%2b%2b/e
xamples/dom_read_write/example.xml?rev=HEAD&content-type=text/vnd.viewcvs-ma
rkup

If we don't know how to fix this then, yes, we should try it in pure libxml
first.

Murray Cumming
murrayc usa net
www.murrayc.com 




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