Using XmlDocument/Dataset/XmlTextReader
FusionCharts Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Using XmlDocument/Dataset/XmlTextReader Expand / Collapse
Author
Message
Posted 11/8/2007 5:30:21 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 11/8/2007 5:22:21 AM
Posts: 1, Visits: 1
I am using one of the sample XML for FusionCharts. If I set the Xml content as a string variable or read it from a text file which has the xml content the FusionChart works fine.

But if I read the same text file in XmlDocument or Dataset/XmlTextReader, geneate XML from that object and then set the XML to the chart it does not work. I think the problem is due to extra line breaks (formatted Xml) added by Dataset or XmlDocument.

//Works

string xmlDataYear = File.ReadAllText(MapPath("../FusionCharts/WeeklyAttendance.txt"));

 

//Does NOT Work

DataSet ds = new DataSet();

ds.ReadXml(MapPath("../FusionCharts/WeeklyAttendance.txt"));

string xmlDataYear = ds.GetXml();

Post #2991
Posted 11/8/2007 6:45:23 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: Today @ 6:58:37 AM
Posts: 632, Visits: 1,928

please use this code after return xml string its remove enter char and also remove ( " ) char from the string

xmlDataYear = xmlDataYear.Replace("\r", "");
xmlDataYear = xmlDataYear.Replace("\"", "'");

after that you render with FusionCharts.

Regards
Arindam


Thanks,
Arindam

FusionCharts Team
www.fusioncharts.com

Post #2992
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -7:00, Time now is 7:04pm


Execution: 0.047.