title: Add custom attributes when serializing Object to XML
body: <p>is it possible to have a declarative markup for a C# object model in order to generate something like this:</p>
  
  <pre><code> ...
   &lt;locales&gt;
      &lt;add id="698" code="tr" name="Turkish" xsd:Transform="Insert"/&gt;
      &lt;add id="701" code="fr" name="French" /&gt;
   &lt;/locales&gt;
   ....
  </code></pre>
  
  <p>instead of :</p>
  
  <pre><code>  ...
    &lt;locales&gt;
      &lt;add d5p1:Transform="Insert" Locator="asdasdf" id="698" code="tr" name="Turkish" xmlns:d5p1="xdt" /&gt;
      &lt;add id="701" code="fr" name="French" /&gt;
    &lt;/locales&gt;
    ...
  </code></pre>
  
  <p>a simple example of my code is:</p>
  
  <pre><code>public class BaseTransformation
  {
      [XmlAttribute]
      public string IsDefault { get; set; }
  
      [XmlAttribute(Namespace ="xdt")]
      public string Transform { get; set; }
  
      //[XmlAttribute("Locator")]
      public string Locator { get; set; }       
  }
  
  
  public class Locale : BaseTransformation
  {
      [XmlAttribute("id")]
      public long ID { get; set; }
  
      [XmlAttribute("code")]
      public string Code { get; set; }
  
      [XmlAttribute("name")]
      public string Name { get; set; }
  }
  
  
  public class Languages
  {
      [XmlArray(ElementName = "locales")]
      [XmlArrayItem(ElementName = "add")]
      public Locale[] Locales { get; set; }
  }
  </code></pre>
  
  <p>I am trying to generate dynamically web.config transformations. 
  <strong>d5p1:Transform="Insert" xmlns:d5p1="xdt"</strong> those two are not recognizable
  on build and does not apply the same functionality as intended. </p>