[xsd-users] controlling the pretty printer format

Wesley Peters Wesley.Peters at tachyon.com
Wed Jun 26 15:25:16 EDT 2013


Just take the XML the human beings are going to read and toss it into XML::LibXML::PrettyPrint.  This is the sort of thing Perl was made for.

On 6/26/13 6:42 AM, "Boris Kolpackov" <boris at codesynthesis.com> wrote:

Hi Al,

Al Niessner <Al.Niessner at gmx.net> writes:

>
> I am using XSD to serialize an XML object-tree in memory. While a
> machine is processing the XML so are humans. The standard serialization
> looks good, but I want to be nit-picky and control more of it. I would
> like three spaces for indentation instead of two. I like my attributes
> on separate lines, etc. What is the easiest way to control the pretty
> printer format of serialization?

Write your own XML serializer?

Seriously, though, XSD uses Xerces-C++ DOM serializer and as far as
I know it doesn't allow this kind of deep customizations. Maybe you
can derive your own serializer from it and customize those things,
but I don't know for sure.


Boris




________________________________

Confidentiality Notice: The information contained in this electronic e-mail and any accompanying attachment(s) is intended only for the use of the intended recipient and is confidential and/or privileged. If you and we have a confidentiality agreement or other non-disclosure obligations between us, this Notice shall be deemed to mark and identify the content of this email and any attachments as confidential and proprietary. If any reader of this communication is not the intended recipient, unauthorized use, disclosure or copying is strictly prohibited, and may be unlawful. If you have received this communication in error, please immediately notify the sender by return e-mail, and delete the original message and all copies from your system. Thank you.

IRS Circular 230 Disclosure: To ensure compliance with requirements imposed by the IRS, please be advised that any U.S. federal tax advice contained in this communication (including any attachments) is not intended or written to be used or relied upon, and cannot be used or relied upon, for the purpose of (i) avoiding penalties under the Internal Revenue Code, or (ii) promoting, marketing or recommending to another party any transaction or matter addressed herein.

E-mail is susceptible to data corruption, interception, unauthorized amendment, tampering and viruses, and we only send and receive e-mails on the basis that we are not liable for any such corruption, interception, amendment, tampering or viruses or any consequences thereof.



More information about the xsd-users mailing list