I am trying to parse a XML-file, that could have different element names, except the root.
I would like to get first a list of all "Stockholm", "London".. etc (names would be unknown to the application). Then i would like to get all sub-elements of each "Stockholm". I am trying to build a treeview with this information, where the parts "Stockholm" and "London" would be the root of each node, and the child elements with id/name/tag should get listed under each previous element.
An example how the XML-file would look like is this
<?xml version="1.0" encoding="utf-8"?>
<Nodes>
<Stockholm>
<id>101</id>
<Name>Södertälje</Name>
<Tag>digital2</Tag>
</Stockholm>
<Stockholm>
<id>102</id>
<Name>Kungens Kurva</Name>
<Tag>digtal1</Tag>
</Stockholm>
<London>
<id>201</id>
<Name>Bloomsbury</Name>
<Tag>digital2</Tag>
</London>
<London>
<id>202</id>
<Name>Brixton</Name>
<Tag>digtal1</Tag>
</London>
<Tokyo>
<id>301</id>
<Name>Ogasawara Island</Name>
<Tag>digtal1</Tag>
</Tokyo>
<Tokyo>
<id>302</id>
<Name>Izu</Name>
<Tag>digital2</Tag>
</Tokyo>
<Washington>
<id>401</id>
<Name>Pleasant Plaint</Name>
<Tag>digital2</Tag>
</Washington>
<Washington>
<id>402</id>
<Name>Georgetown</Name>
<Tag>digtal1</Tag>
</Washington>
</Nodes>
How would i go about to do this in silverlight? All example code i have found, assumes one knows all elements by name.