I have this xml data
<Categories>
<cat name="Appliances"></cat>
<cat name="Arts, Crafts & Sewing"></cat>
<cat name="Automotive"></cat>
<cat name="Baby"></cat>
</Categories>
and I use this code to read the data into combobox:
XmlDocument xDoc = new XmlDocument();
xDoc.Load("cat.xml");
XmlNodeList cats = xDoc.GetElementsByTagName("cat");
for (int i = 0; i < cats.Count; i++)
{
comboBox1.Items.Add(cats[i].Attributes["name"].InnerText);
}
but at line xDoc.Load("cat.xml");
I get error:
An unhandled exception of type 'System.Xml.XmlException' occurred in System.Xml.dll An error occurred while parsing EntityName. Line 3, position 30.
what this mean ?