
174 II Buildable Tools
node = node ["Table "];
// Navigate to the first row , which has the column headers
node = node ["Row "];
int index = 0;
foreach (XmlNode child in node. ChildNodes)
{
if ( child .Name == " Cell")
{
fields [child [" Data"]. InnerText] = index ;
Listing 12.2. C# code to parse the header fields (parsexml.cs).
Next, we need to iterate over each additional row and create objects for each.
The following class and enumerations, shown in Listing 12.3, will be used to store
our data during parsing.
enum CharacterClass
{
Standard ,
Armored
}
class CharacterData
{
public string character;
public string description;
public float hitPoints;
public float