title: How to serialize/deserialize simple classes to XML and back
body: <p>Sometimes I want to emulate stored data of my classes without setting up a round trip to the database.  For example, let's say I have the following classes:</p>
  
  <pre><code>public class ShoppingCart
  {
      public List&lt;CartItem&gt; Items {get; set;}
      public int UserID { get; set; }
  }
  
  public class CartItem
  {
      public int SkuID { get; set; }
      public int Quantity  { get; set; }
      public double ExtendedCost  { get; set; }
  }
  </code></pre>
  
  <p>Let's say I build a <code>ShoppingCart</code> object in memory and want to "save" it as an XML document.  Is this possible via some kind of <code>XDocument.CreateFromPOCO(shoppingCart)</code> method? How about in the other direction: is there a built-in way to create a <code>ShoppingCart</code> object from an XML document like <code>new ShoppingCart(xDoc)</code>?</p>