views:

26

answers:

1

I use a lot of XML serialization in one app I am busy with. .Net by default just shoves everything on 1 line.

Is it not possible to get some formatting order during the serialization. Would like to have it neater, because at times people have to open these xml files up and read them.

I guess what would be awesome is to have correct indentation and line breaks.

Thanks in advance

+4  A: 

On your XmlTextWriter object, set the Formatting to Formatting.Indented, and set the Indentation property to the number of spaces to indent each level.

richardtallent
+1 sounds good to me, thanks :)
JL