Re: [xml] Setting serialize() indent level...



Hi Stuart,

On Fri, 2004-01-30 at 13:47, Stuart Hungerford wrote:
When serializing libxml2 node or document objects I can set the
"format" parameter to ensure the serialized output is nicely
indented.

Is there some way to set the number of spaces used for indenting
(e.g. 4 spaces instead of the default two)?

There is a global variable, xmlTreeIndentString (a const char*) that you
can set to a string containing the number of spaces you want to indent.

One example of its use is in xmllint.c.

Cheers,
Malcolm




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