<SubTexture name="explosion0000.png" x="180" y="474" width="24" height="25"/>
<SubTexture name="explosion0001.png" x="422" y="609" width="30" height="30"/>
<SubTexture name="explosion0002.png" x="395" y="981" width="34" height="34"/>
<SubTexture name="explosion0003.png" x="354" y="981" width="39" height="39"/>
Above are four lines of an XML file from which I need to extract the information into a list. I need to read each line and use the strings and the values to do a specific task. To do this I use the code
{
XmlReader xmlReader = XmlReader.Create("D:/C#/GameAssets/Images/alienExplode/images/alienExplode.xml");
while (xmlReader.Read())
{
Console.Write(xmlReader.Name);
while (xmlReader.MoveToNextAttribute()) // Read the attributes.
Console.Write(" " + xmlReader.Name + " = '" + xmlReader.Value + "' ");
Console.WriteLine(" ");
}
Console.ReadKey(); // wait for keyboard input to exit
}`
But i don't know how to get the values into a list so that I can read it, extract the data and use it. Can someone help?