C# XML错误:根级别的数据无效
我得到这个错误: 根级别的数据无效。 第1行,位置1 这是我的密码:C# XML错误:根级别的数据无效,c#,.net,xml,C#,.net,Xml,我得到这个错误: 根级别的数据无效。 第1行,位置1 这是我的密码: XmlDocument doc = new XmlDocument(); foreach (string c in colorList) { doc.LoadXml("http://whoisxmlapi.com/whoisserver/WhoisService?domainName=" + c + "&username=user&password=pass"); textBo
XmlDocument doc = new XmlDocument();
foreach (string c in colorList)
{
doc.LoadXml("http://whoisxmlapi.com/whoisserver/WhoisService?domainName=" +
c + "&username=user&password=pass");
textBox1.Text += doc.SelectSingleNode(
"/WhoisRecord/registrant/email").InnerText + ",";
}
有人知道我为什么会得到这个例外吗
我已尝试在浏览器中运行URL,没有任何问题使用doc.Loadhttp:。。。
LoadXml用于XML字符串,而不是URL使用doc.Loadhttp:。。。
LoadXml用于XML字符串,而不是URL