public static string ToXmlString(Node node) { StringWriter sw = new StringWriter(); new XmlSerializer(node.GetType()).Serialize(sw, node); return sw.ToString(); }