title: Custom indent for default xmlns attribute wile writing through XmlWriter
body: <p>I'm struggling a bit trying to find the appropriate way of writing exactly this XML with XmlWriter and underlying string builder:</p>
  
  <pre><code>&lt;x:node xmlns="uri:default"
          xmlns:x="uri:special-x"
          xmlns:y="uri:special-y"
          y:name="MyNode"
          SomeOtherAttr="ok"&gt;
  &lt;/x:node&gt;
  </code></pre>
  
  <p>The best I have so far:</p>
  
  <pre><code>static string GetXml()
  {
      var r = new StringBuilder();
      var w = XmlWriter.Create(r, new XmlWriterSettings { OmitXmlDeclaration = true });
      w.WriteStartElement("x", "node", "uri:special-x");
      w.Flush();
      r.Append("\n" + new string(' ', 7));
      w.WriteAttributeString("xmlns", "x", null, "uri:special-x");
      w.Flush();
      r.Append("\n" + new string(' ', 7));
      w.WriteAttributeString("xmlns", "y", null, "uri:special-y");
      w.Flush();
      r.Append("\n" + new string(' ', 7));
      w.WriteAttributeString("name", "uri:special-y", "vd");
      w.Flush();
      r.Append("\n" + new string(' ', 7));
      w.WriteAttributeString("SomeOtherAttr", "ok");
      w.Flush();
      w.WriteEndElement();
      w.Flush();
      return r.ToString();
  }
  </code></pre>
  
  <p>which creates</p>
  
  <pre><code>&lt;x:node
          xmlns:x="uri:special-x"
          xmlns:y="uri:special-y"
          y:name="vd"
          SomeOtherAttr="ok" /&gt;
  </code></pre>
  
  <p>but I cannot find a way to write default xmlns right after the node. Any try leads to error or different formatting.</p>
  
  <p>Any ideas? Thanks!</p>
  
  <p>Update: maybe I can write it directly to the StringBuilder but I look for more... hm.. correct approach.</p>