Re: [xml] Pretty print in libxml2
- From: Zoltán Ördögh (GMail) <csimbi gmail com>
- To: shtil comcast net
- Cc: xml gnome org
- Subject: Re: [xml] Pretty print in libxml2
- Date: Tue, 23 Apr 2013 13:15:26 -0400
Did you set the indentation settings in the writer?
Best regards: Zoltán Ördögh
On Tue, Apr 23, 2013 at 12:56 PM,
<shtil comcast net> wrote:
Hi,
I wonder if there is a way to pretty print xml.
Referring to the examples for xmlWriter I want <?xml version="1.0" encoding="ISO-8859-1"?>
<EXAMPLE><!--This is a comment with special chars: <äöü>--><ORDER version="1.0" xml:lang="de"><!--This is another comment with special chars: <äöü>--><HEADER><X_ORDER_ID>0000053535</X_ORDER_ID><CUSTOMER_ID>1010</CUSTOMER_ID><NAME_1>Müller</NAME_1><NAME_2>Jörg</NAME_2></HEADER><ENTRIES><ENTRY><ARTICLE><Test></ARTICLE><ENTRY_NO>10</ENTRY_NO></ENTRY><ENTRY><ARTICLE><Test 2></ARTICLE><ENTRY_NO>20</ENTRY_NO></ENTRY></ENTRIES><FOOTER><TEXT>This is a text.</TEXT></FOOTER></ORDER></EXAMPLE>
to look like:
<?xml version="1.0" encoding="ISO-8859-1"?>
<EXAMPLE>
<!--This is a comment with special chars: <äöü>-->
<ORDER version="1.0" xml:lang="de">
<!--This is another comment with special chars: <äöü>-->
<HEADER>
<X_ORDER_ID>0000053535</X_ORDER_ID>
<CUSTOMER_ID>1010</CUSTOMER_ID>
<NAME_1>Müller</NAME_1>
<NAME_2>Jörg</NAME_2>
</HEADER>
<ENTRIES>
<ENTRY>
<ARTICLE><Test></ARTICLE>
<ENTRY_NO>10</ENTRY_NO>
</ENTRY>
<ENTRY>
<ARTICLE><Test 2></ARTICLE>
<ENTRY_NO>20</ENTRY_NO>
</ENTRY>
</ENTRIES>
<FOOTER>
<TEXT>This is a text.</TEXT>
</FOOTER>
</ORDER>
</EXAMPLE>
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
xml gnome org
https://mail.gnome.org/mailman/listinfo/xml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]