title: C# - Hydrate existing object with XML
body: <p>I know I can use Linq to map fields from XML to fields in a pre-existing object. Are there any functions in the .NET Framework (or other libraries) that make this less manual.</p>
  
  <p>I would like to write (and have the HydrateFromXml behave a little like AutoMapper does):</p>
  
  <pre><code>var myObject = new MyObject(/*ctor args*/);
  
  myObject = myObject.HydrateFromXml(string xml);
  </code></pre>
  
  <p><strong>Edit:</strong></p>
  
  <p>Could I use the decorator pattern or a simple wrapper object here? Deserialize directly into a type that is wrapped by an abstraction that permits the fine-grained construction control I need?</p>