I have a file data.xml (attached) that I am using as a data source. When calling RenderChartHTML with strURL populated all works as expected and I get my chart. If I try to read in that same file and use it as strXML I get an "Invalid XML Data" error. I have stripped it down to only relevant lines. Here is the code behind:
public string GetChartHtml()
{
TextReader tr = new StreamReader(Server.MapPath("data.xml"));
String xmlStringFromFile = tr.ReadToEnd();
tr.Close();
//return FusionCharts.RenderChartHTML("/FusionCharts/Charts/MSColumn3D.swf", "data.xml", "", "chartDiv", "600", "300", false);
return FusionCharts.RenderChartHTML("/FusionCharts/Charts/MSColumn3D.swf", null, xmlStringFromFile, "chartDiv", "600", "300", false);
}
If you could point to what I am doing incorrectly I would greatly appreciate it.
Thanks,
Erik
data.xml