public static object XmlDeserialize(Type type, string xml) { var xmlFormatter = new XmlFormatter(type); var graph = xmlFormatter.Deserialize(xml); return(graph); }
public static string XmlSerialize(object graph) { var xmlFormatter = new XmlFormatter(graph.GetType()); var xml = xmlFormatter.Serialize(graph); return(xml); }