Re: [gdome]saving xml tree: no new line after xml elements printing



Daniel,

I looked at the libxml document. But it seems that the usage
of xmlIndentTreeOutput is not documented.

In my application I set xmlIndentTreeOutput=1 and run my program
again. The setting had no effect on the indentation
(the saved xml tree File was not indented.)

If in routine xmlSaveFile I put modify the code as follows:
xmlDocContentDumpOutput(buf, cur, NULL, 1);
                                        * 1 instead of 0

then the output is dumped with nice identation.  

I was expecting to see that setting xmlIndentTreeOutput to 1 would have
the
same effect as modifying the code as above.

What should I do to force indentation through the DOM interface?

Thanks,

Laurent



 

Daniel Veillard wrote:
> 
> On Thu, Apr 26, 2001 at 11:55:31AM +0200, Laurent Lemaitre wrote:
> > Paolo,
> >
> > It seems to me that having the feature of printing a newline after
> > each xml elements are printed is something that should be set-able
> > from a call to gdome_DOMImplementation_saveFile (the best would be
> > a tabulation the number of which depends on the depth of the xml
> > element).
> >
> > Would not be possible to add this feature to
> > gdome_DOMImplementation_saveFile? (a new argument like beautify set-able
> > TRUE or FALSE)
> >
> > I don't know if this makes sense and if I can help?
> 
>   This can be achieved at the libxml level (but it's not used by defaut)
> check the following:
>    extern int xmlIndentTreeOutput;  /* try to indent the tree dumps */
> 
>    and the format arg of:
> 
>    xmlDocDumpFormatMemory()
>    xmlDocDumpFormatMemoryEnc()
>    xmlNodeDump()
> 
> Daniel
> 
> --
> Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
> 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]