On Mon, Apr 06, 2009 at 05:10:39PM -0700, Aaron Patterson wrote: > On Mon, Apr 6, 2009 at 4:01 PM, Aaron Patterson > <[email protected]> wrote: > > Hi, > > > > Is there a way to adjust the indenting level when using xmlSaveToIO()? > > I've set xmlIndentTreeOutput to 1, set the xmlTreeIndentString, and > > made sure to enable XML_SAVE_FORMAT in the options, but none of this > > seems to help. Any hints would be greatly appreciated. > > > > The code I have right now is like this: > > > > xmlIndentTreeOutput = 1; > > xmlTreeIndentString = "---------------"; > > > > xmlSaveCtxtPtr savectx = xmlSaveToIO( > > (xmlOutputWriteCallback)io_write_callback, > > (xmlOutputCloseCallback)io_close_callback, > > (void *)io, > > NULL, > > options > > ); > > > > xmlSaveTree(savectx, node); > > xmlSaveClose(savectx); > > Nevermind! It works fine. I just had blank text nodes in my tree > that disabled the formatting.
Ah, okay, but again this is a global variable, I guess a setting in the xmlSaveCtxtPtr would be way better, Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ [email protected] | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
