For easy reference, this is how to serialize an object to an Xml string:
public static string SerializeToXmlString<T>(T o) { XmlSerializer serializer = new XmlSerializer(typeof(T)); StringWriter writer = new StringWriter(); serializer.Serialize(writer, o); writer.Close(); return writer.GetStringBuilder().ToString(); }
/Emil