I always worked with easy xml structures and simple xaml bindings. Now I am a bit confused while trying some complex stuff. I was reading this WP7 How to parse the XML? question and its answers but I couldn’t understand the displaying the data part.
I have similar XML Data like this:
<?xml version="1.0"?>
<top>
<value name="Finals">
<country home="sweden" away="italy" venue="aaa"/>
</value>
<value name="Semi-finals">
<country home="Germany" away="sweden" venue="ccc"/>
<country home="france" away="italy" venue="ddd"/>
</value>
</top>
And the result I want to see is:
Finals
- Sweden - Italy in AAA
Semi-finals
- Germany - France in ccc
- France - Sweden in ddd
Is there a way to do this with Xaml binding stuff. If you have any WP7 tutorial links about this I would be grateful.
WPF has an XML binding API, however Silverlight for WP7 does not. I would use Linq to XML to create the string you are after.
Something like this should work …
See the MSDN documentation for Linq to XML for more details.