Sign in to follow this  

Using XmlDocument/Dataset/XmlTextReader

Recommended Posts

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.

string xmlDataYear = File.ReadAllText(MapPath("../FusionCharts/WeeklyAttendance.txt"));
//Does NOT Work
DataSet ds = new DataSet();
string xmlDataYear = ds.GetXml();

Share this post

Link to post
Share on other sites

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.







Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this