XmlDocument doc = new XmlDocument();
string strxml="<item>Client.Xml</item>";
doc.LoadXML(strxml);
可以改为
strxml = "<" + strxml.Substring(strxml.IndexOf('<') + 1);
doc.LoadXml(strxml.Trim());
去除多余字符即可
XmlDocument doc = new XmlDocument();
string strxml="<item>Client.Xml</item>";
doc.LoadXML(strxml);
可以改为
strxml = "<" + strxml.Substring(strxml.IndexOf('<') + 1);
doc.LoadXml(strxml.Trim());
去除多余字符即可