I am trying to read in a simple xml file but am having some issues. Here is the code to read it:
XmlDocument doc = new XmlDocument();
doc.Load("C:/file.xsd");
XmlNode loc = doc.SelectSingleNode("/schema/annotation/appinfo");
XmlNodeList refNode= loc.SelectNodes("referral");
And here is what the XML looks like:
<schema>
<annotation>
<appinfo>
<referral/>
<referral/>
<referral/>
</appinfo>
</annotation>
</schema>
I've simplified it for readabilities sake, but I am trying to read in the 'referral' nodes. I confirmed that the file is being read in however the 'loc' variable is null.
Would appreciate some help with this, thanks!