How to stream an Object as XML

dotnet example

Dotnet code example
Streaming an object as xml
Controlling streaming with xml attributes
Controlling array elements