I am Working on Windows Phone 8 application:
I have a document like this :
SubTopics
I used Hakan's Parser class almost straight out of the box: I needed an integer element but no true or false - simple edits. This snippet might help people test their code. I have renamed some of Hakan's symbols to fit my project.
private void Button_Click_1(object sender, RoutedEventArgs e)
{
List> topicsList = topicParser.Parse(topicsXDocument.Root);
Console.WriteLine("The Topics List contains:");
foreach (Dictionary topic in topicsList)
{
foreach (KeyValuePair element in topic)
{
string name = element.Key;
object content = element.Value;
Console.WriteLine("Key: {0}, Value: {1}", name, content.ToString());
}
}
}