How obtain export xml from object

Unofficial Content

// source is a KBObject

StringBuilder buffer = new StringBuilder();
using (TextWriter writer = new StringWriter(buffer))
source.Serialize(writer);
string objExport = buffer.ToString();