title: How do I add an XML attribute using DataContract
body: <p>I have a simple class I'm serializing.</p>
  
  <pre><code> [DataContract(Name = "Test", Namespace = "")]
   public class Test
   {
      [DataMember(Order = 0, Name = "Text")]
      public string Text { get; set; }
  
      public Test() {}
   }
  </code></pre>
  
  <p>This kicks out the following XML:</p>
  
  <pre><code>&lt;Test&gt;
     &lt;Text&gt;Text here&lt;/Text&gt;
  &lt;/Test&gt;
  </code></pre>
  
  <p>What I want is:</p>
  
  <pre><code>&lt;Test&gt;
     &lt;Text type="MyType"&gt;Text here&lt;/Text&gt;
  &lt;/Test&gt;
  </code></pre>
  
  <p>How do I add attributes the the XML elements?</p>
  
  <p>Thanks in advance.</p>