nickpdx Report post Posted April 4, 2007 I have been using the setDataURL method to load charts, but I wanted to switch because I want to further process the chart's XML using JavaScript; I want to get the returned XML, hand it to my chart using setDataXML(), then hand it to further processes. But setDataXML() complains for every one of my charts, "Invalid XML data." I am attaching the captured XML exactly as it is returned from an ajaxy-type server call. I'm handing it to setDataXML() as a string, so the contents of that string should be exactly equal to what's in the attachment. That said, I fail to see how it's invalid XML. I have tried removing all newline characters; and removing the link attribute which contains the only characters that are even slightly different (encoded entities) - but those entity encodings still make valid XML. Like I said, this exact same XML when returned via setDataURL() is accepted by the chart just fine. example xml.txt Share this post Link to post Share on other sites
nickpdx Report post Posted April 4, 2007 I found the cause of this issue thru trial and error... As it turns out, if you call setDataXML() _before_ calling render(), you must escape the XML string using javascript's escape() function. If you later call setDataXML() on the resulting embedded flash object, you don't have to escape the XML. I don't think this is covered in the documentation, I know that no discussion of escape() exists in the v3 docs section Web Developers > FusionCharts and Javascript. Share this post Link to post Share on other sites