title: How to remove unnecessary xmlns attribute in C#?
body: <p>I'm trying to update an existing XML file, but always when I update it adding new tags the  xmlns="" attribute mysteriously appears in all tags and I didn't find a way to remove it.</p>
  
  <pre><code>    private static void EditarXML(string path, List&lt;SiteUrl&gt; listaUrls, bool indice, string loc)
      {
          XmlDocument documentoXML = new XmlDocument();
          documentoXML.Load(path);
  
              XmlNode sitemap = documentoXML.CreateElement("sitemap");
  
              XmlNode xloc = documentoXML.CreateElement("loc");
              xloc.InnerText = loc;
              sitemap.AppendChild(xloc);
  
              XmlNode lastmod = documentoXML.CreateElement("lastmod");
              lastmod.InnerText = DateTime.Now.ToShortDateString();
              sitemap.AppendChild(lastmod);
  
              documentoXML.DocumentElement.AppendChild(sitemap);
      }
  </code></pre>
  
  <p>Any help or ideas would be appreciated.</p>