I answered this where you cross-posted on stackoverflow:
http://stackoverflow.com/questions/7717036/serialize-protocol-buffer-file-into-xml-text-format
To repeat; in most cases, the generated code **should already** work
perfectly well with XmlSerailizer (the inbuilt .NET xml serialization tool),
I am using protocol buffer in .net http://code.google.com/p/protobuf-net/.
I installed the visual studio support version, which I can just write
proto file in project and it generates csharp class files
automatically.
A lot of times that I need to dump the files into xml(or another text
format if