Re: [xml] xmlDocDump() generates output on one line

On Tue, Mar 14, 2006 at 05:59:58PM -0800, Yong Chen (yongche) wrote:

In FAQ, it states xmlDocDump outputs to one line only (which is true),
the #1 suggestion is "to generate those yourself too", can you please
elaborate it?

Do you mean we should traverse the doc tree ourselves to print out nodes
with indentation

  yes. Alternatively if you know you don't have mixed content in the 
generated document, use the xmlsave API
and pass an XML_SAVE_FORMAT option when creating the save context.


Daniel Veillard      | Red Hat
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]