string querycountend = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" + string字符串.Replace("&", "");//如果string 字符串没有表头,或有特殊字符 XmlDocument querydoc = new XmlDocument(); querydoc.LoadXml(querycountend);