Re: [libxml++] const bool xmlpp::KeepBlanks::Default = true [Writing an XML]
- From: Murray Cumming <murrayc murrayc com>
- To: Andrea Fiorito <plink rocketmail com>, libxmlplusplus-general lists sourceforge net
- Subject: Re: [libxml++] const bool xmlpp::KeepBlanks::Default = true [Writing an XML]
- Date: Thu, 01 Apr 2010 13:56:23 +0200
I think this is just an issue of libxml refusing to format a document that has possibly-significant text nodes. Please see the archive for the last few days.
----- Original message -----
> Hi all,
>
>
> I would use the function Document::write_to_file_formatted to write an XML file.
> The problem is that i was not able to have the output formatted in a right way,
> it is like it's not formatted. I try then to compile an xml2 example to see if
> it produces an output well formatted and it's ok.
> [http://xmlsoft.org/examples/tree2.c]. My analysis is (but maybe i am wrong)
> that function write_to_file_formatted is a wrapper for do_write_to_file.
> (obviously) In do_write_to_file, the first line is KeepBlanks
> k(KeepBlanks::Default). It seems to me that it sets libxml2's keepsblanks (or
> something like that) to the value true using a const value (KeepBlanks::Default,
> which i can't modify). It seems to me that to produce a formatted output the
> following conditions must be satisfied: 1) keepsblanks = false 2)
> xmlIndentTreeOutput = 1
>
> Can you explain me how to achieve the desired formatted output, please?
>
>
> Thank you in advance,
> Andrea
>
> ps: apologize for my english.
>
>
>
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]