Re: [xml] indent in the output file
- From: Roland Schwingel <Roland Schwingel onevision com>
- To: Philipp Spritzey <philipp spritzey nt tuwien ac at>
- Cc: xml gnome org
- Subject: Re: [xml] indent in the output file
- Date: Wed, 23 Mar 2005 14:34:50 +0100
Hi Phillip,
> After using xmlTextWriterSetIndent(m_writer,
MY_INDENT) and
> xmlTextWriterSetIndentString(m_writer, MY_INDENT_STR)
> with const MY_INDENT = 4 and const xmlChar MY_INDENT_STR[2] = "
",
> i experienced, that there is no difference in the output,
> whatever the indent parameter is 1, 2 or greater.
>
> Is this a bug? How to i set an indent of 4 spaces?
Maybe you have misinterpreted the docs...
Try that one:
xmlTextWriterSetIndent(m_writer, 1);
xmlTextWriterSetIndentString(m_writer, "
");
The first one tells you to enable indention, the second
one supplies the indention string (4 spaces here).
This should solve your problem when using the xmlTextWriter
API...
It would also be nice to have this possibilities if
one is not using xmlTextWriterAPI. Like
xmlDocDumpFormatMemory()
xmlDocDumpFormatMemoryEnc()
xmlDocFormatDump()
xmlSaveFormatFile()
xmlSaveFormatFileEnc()
There these possibilities are missing, at present
I am running into a similar problem with these functions
which I have outlined here on friday:
http://mail.gnome.org/archives/xml/2005-March/msg00160.html
At present I have no solution for my problem...
I would also like to have these possibilities when
using a given xmlDoc.
Has anyone a solution for this?
Thanks,
Roland
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]