Here is a simple code example showing how to take a VB Class object and use Xml.Serialization to turn it into an XML string. I had a little trouble finding this code because all the examples wanted to write the XML to disk using a StreamWriter… I needed it in memory as a string
The resulting string looks like this: