How do i go about writing the results of a FOR XML PATH stored procedure into memory rather than a file on disk?
Current way of doing things:
private void GetChartData(string OC_Ttl1, string OC_Ttl2, string OC_OL31)
{
OC_Ttl_1 = OC_Ttl1;
OC_Ttl_2 = OC_Ttl2;
OC_OL3_1 = OC_OL31;
//Output xml
DataSet orgDataSet = new DataSet();
orgDataSet.ReadXml(cmd_Org.ExecuteXmlReader(), XmlReadMode.Auto);
orgDataSet.WriteXml("InputXMLFiles/" + OC_OL3_1.Replace(" ",
"_").Replace("/", "-") + ".xml");
}
Instead of writing the file to disk that other methods then operate on, i want to have this method return the xml to memeory.
I assume that this would be far faster than writing to disk....