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