xml error: Object reference not set to an instance of an object after SelectSingleNode

Posted by every_answer_gets_a_point on Stack Overflow See other posts from Stack Overflow or by every_answer_gets_a_point
Published on 2010-04-14T19:30:50Z Indexed on 2010/04/14 19:53 UTC
Read the original article Hit count: 240

Filed under:
|
|

here's my code:

XmlDocument doc = new XmlDocument();
foreach (string c in colorList)
{
     doc.Load(@"http://whoisxmlapi.com/whoisserver/WhoisService?domainName=" + c + @"&username=user&password=pass");
     textBox1.Text += doc.SelectSingleNode("WhoisRecord/registrant/email").InnerText + ",";
}

for the second line of code (textbox1...) is generating this error what am i doing wrong?

© Stack Overflow or respective owner

Related posts about c#

Related posts about Xml