/// <summary> /// Xml序列化与反序列化 /// </summary> public class XmlUtil { public static string GetRoot(string xml) { if (xml == null) xml = "";//预防下边的 Replace()、Trim()报错 XmlDocument doc = new XmlDocument(); doc.LoadXml(xml.Replace(" ", "").Replace("
/// <summary> /// Xml序列化与反序列化 /// </summary> public class XmlUtil { public static string GetRoot(string xml) { if (xml == null) xml = "";//预防下边的 Replace()、Trim()报错 XmlDocument doc = new XmlDocument(); doc.LoadXml(xml.Replace(" ", "").Replace("