Is there a convenient way to convert a PolygonN serialized as XML to a Silverlight ESRI.ArcGIS.Client.Geometry.Polygon? Back in the Web ADF days, you could use a combination of System.Xml.Serialization.XmlSerializer and ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.Converter.ToAdfPolygon to create the Web ADF polygon from the PolygonN XML. I would like to do the same within Silverlight to create ESRI.ArcGIS.Client.Geometry.Polygons.
I am hoping to avoid parsing the XML for the ring(s)/PointArray/Points and manually constructing the Silverlight polygon.
Background: On one project we have a fairly substantial web service that pulls data from numerous sources (GIS and non-GIS) and among the return data are Esri Geometries (PolygonN, PolylineN, PointN) serialized as XML on the server and returned to the service consumer as a string. I don't have the luxury of modifying this web service, and am hoping to avoid having to create some kind of companion service that returns the Esri geometries in a more "Silverlight-friendly" way (for example, I've read the Esri blog post "Sending geometry between Silverlight and the server using WCF" - good post and I totally get how to do that, but don't want to go there...).
ArcGIS Server 10 SP3 and Silverlight API 2.2 (though that may soon change to 2.3).
In this thread, I gave code to serialize and deserialize graphics in XML (including geometry). Not sure it's useful if your XML input geometry is not using the same exact format, but it's worth to look at.