[xsd-users] controlling the pretty printer format

Boris Kolpackov boris at codesynthesis.com
Wed Jun 26 09:42:59 EDT 2013


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



More information about the xsd-users mailing list