title: How to Remove <xml version="1.0"> Element in C#
body: <p>my xml content in variable look like:</p>
  
  <pre><code> var xml = DownloadString(@"http://192.168.1.50:8983/solr/core-live/select?q=*%3A*&amp;wt=xslt&amp;tr=custom.xsl");
  </code></pre>
  
  <p>DownloadString is a function/method</p>
  
  <pre><code>public static string DownloadString(string address) 
       {
          string text;
           using (var client = new WebClient()) 
           {
             text = client.DownloadString(address);
           }
             return text;
        }
  </code></pre>
  
  <p>and when i am debugging on xml variable and xml o/p look like:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;xml version="1.0"&gt;
  &lt;item&gt;
  &lt;sku&gt;12944&lt;/sku&gt;
  &lt;title&gt;test&lt;/title&lt;/item&gt;
  &lt;/xml&gt;
  </code></pre>
  
  <p>i want to remove second node(<code>&lt;xml version="1.0"&gt;</code>) and last node(<code>&lt;/xml&gt;</code>) from same variable.</p>
  
  <p>then after save content in xml file using this:</p>
  
  <pre><code> System.IO.File.WriteAllText("test.xml", xml);
  </code></pre>
  
  <p>regards,
  Jatin</p>