I know that I can use Linq to map fields from XML to fields in a pre-existing object. Are there any features in the .NET Framework (or other libraries) that make this less convenient?
I would like to write (and HydrateFromXml will be a bit like AutoMapper):
var myObject = new MyObject(); myObject = myObject.HydrateFromXml(string xml);
Edit:
Can I use a decorator template or a simple wrapper object here? Remove deserialization directly into the type that is wrapped in abstraction, which allows fine-grained control of the structure I need?
Ben
source share