How do I load the following nested XML into a DataSet?
<items>
<item>
<id>i1</id>
<name>item1</name>
<subitems>
<name>subitem1</name>
<name>subitem2</name>
</subitems>
</item>
<item>
<id>i2</id>
<name>item2</name>
<subitems>
<name>subitem1</name>
<name>subitem2</name>
</subitems>
</item>
</items>
I can get as far as a the "item" table but how do I get the subitems?
MemoryStream itemsStream = new MemoryStream(Encoding.ASCII.GetBytes(itemsXML));
DataSet itemsSet = new DataSet();
itemsSet.ReadXml(itemsStream);
foreach (DataRow itemRow in itemsSet.Tables["item"].Rows) {
Console.WriteLine("column id=" + itemRow["id"] as string + " name=" + itemRow["name"] as string);
}