Serialization

Serialization

XmlAnyElement – Silverlight

When using the XmlAnyElementAttribute to serialize/deserialize an Xml file in Silverlight, you’ll come up against a minor problem. the MSDN documentation states: Specifies that the member (a field that returns an array of XmlElement or XmlNode objects) contains objects that represent any XML element that has no corresponding member in the object being serialized or deserialized. However, in SilverLight you don’t have wither of these objects, you’re restricted to what’s available via the System.Xml.Linq namespace Luckily the XElement object does the job, so code like this will work:   ...