title: XMLSerializer to XElement
body: <p>I have been working with XML in database LINQ and find that it is very difficult to work with the serializer.</p>
  
  <p>The database LINQ required a field that store <code>XElement</code>.</p>
  
  <p>I have a complex object with many customized structure class, so I would like to use the XmlSerializer to serialize the object.</p>
  
  <p>However, the serializer can only serialize to file ("C:\xxx\xxx.xml") or a memory stream.</p>
  
  <p>However to convert or serialize it to be a XElement so that I can store in the database using LINQ?</p>
  
  <p>And How to do the reverse? i.e. Deserialize an XElement...</p>