Hi all.
I have below an xml file which i am trying to insert into a database with the below code. But I am having this error below too.
error
Object reference not set to an instance of an object.
Line 125: foreach (XmlNode xndNode in xnlNodes)
Line 126: {
Line 127: string name = xndNode["Name"].InnerText;
Line 128: string year = xndNode["Year"].InnerText;
Line 129: // string supplier = xndNode["Supplier"].Value.ToString();
XML file
<Models>
<Model Name="BENZ" Year="1970" Supplier="KEE" >
<Field Type="single" front="Red" back="Indigo"></Field>
<Field Type="double" front="Red" back="Blue"></Field>
</Model>
<Model Name="BMW" Ye ...
Go to the complete details ...