I've got a large XML file and so I'm using XMLTextReader. I'm having trouble reading the value becaues the formatting is a bit different from other XML files I've worked with.
<class>
<column>Size</column><int>30</int>
<column>TeamColor</column><string>red</string>
...
</class>
How can I read Size and then get the value 30? I've currently got
while (reader.Read())
{
if (reader.NodeType == XmlNodeType.Element)
element = reader.Name;
else if (reader.NodeType == XmlNodeType.Text)
{
if (element == "column")
{
if(reader.Value == "Size")
//can get true here, but can't return the int value next to it
}
}
}