I am trying to read an xml file in Unity3D using this code
using (XmlReader xmlreader=XmlReader.Create("Assets\\config.xml"))
{
while (xmlreader.Read())
{
Debug.Log (xmlreader.Name.ToString());
}
}
It prints all the names of the elements of the xml file except the last one. Because in the end it gives an invalid data exception. Why?