I'm very new to XML serialization, up until now I've been using XDocument and iterating through an XML file to load stuff up. I know there's a way to serialize XML files, recently I came across the following bit of XML:
<?xml version="1.0" encoding="utf-8" ?>
<XnaContent>
<Asset Type="System.Collections.Generic.Dictionary[System.String, Microsoft.Xna.Framework.Rectangle]">
<Item><Key>frame0</Key><Value>0 0 128 128</Value></Item>
<Item><Key>frame1</Key><Value>128 0 128 128</Value></Item>
</Asset>
</XnaContent>
And have been trying to figure out how I'd load it up and parse it into a dictionary, the top part stating asset type=System.collections.generic.dictionary seems to suggest I should be able to quickly convert this into a dictionary.
So my question is how would I do that? I could easily iterate through the xml structure and match up keys to values but it looks like there would be a better way to do it?