title: .net class xml attribute to create multiple namespaces
body: <p>I want to have a class property when serializing it to have multiple namespaces in the output. The XmlElementAttribute isn't working for me. Can anyone help?</p>
  
  <h1>My code:</h1>
  
  <p><strong>XML Output:</strong></p>
  
  <pre><code>&lt;MyClass&gt;
      &lt;Property1 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/&gt;
      &lt;Property2/&gt;
  &lt;/MyClass&gt;
  </code></pre>
  
  <p><strong>Class:</strong></p>
  
  <pre><code>public class MyClass
  {
      [XmlElementAttribute(Namespace = "http://www.w3.org/2001/XMLSchema-instance")]
      public string Property1 { get; set; }
  
      public string Property1 { get; set; }
  }
  </code></pre>