﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>FusionCharts Forum / FusionCharts Free / XML Issue  / ERROR: Invalid XML encountered. / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>FusionCharts Forum</description><link>http://www.fusioncharts.com/forum/</link><webMaster>support@fusioncharts.com</webMaster><lastBuildDate>Tue, 02 Dec 2008 07:19:33 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: ERROR: Invalid XML encountered.</title><link>http://www.fusioncharts.com/forum/Topic3569-41-1.aspx</link><description>hi,&lt;BR&gt;&lt;BR&gt;Please try this DoubleQuoteFix - FusionCharts.js. We have other issues to test on this quote fix before releasing. But you can give it a try if you need to supply XML attribute (in dataXML method) values in double quotes.&lt;BR&gt;&lt;BR&gt;Tried these OK:&lt;BR&gt;&lt;BR&gt;&lt;BR&gt; myChart.setDataXML("&amp;lt;chart caption='Monthly Sales Summary' &amp;gt;&amp;lt;set label='January' value='1740' /&amp;gt;&amp;lt;set label='February' value='19800' /&amp;gt;&amp;lt;/chart&amp;gt;");&lt;/P&gt;&lt;P&gt;&lt;BR&gt;myChart.setDataXML('&amp;lt;chart caption=\'Monthly Sales Summary\' &amp;gt;&amp;lt;set label=\'January\' value=\'1740\' /&amp;gt;&amp;lt;set label=\'February\' value=\'19800\' /&amp;gt;&amp;lt;/chart&amp;gt;');&lt;/P&gt;&lt;P&gt;&lt;BR&gt; myChart.setDataXML('&amp;lt;chart caption="Monthly Sales Summary" &amp;gt;&amp;lt;set label="January" value="1740" /&amp;gt;&amp;lt;set label="February" value="19800" /&amp;gt;&amp;lt;/chart&amp;gt;');&lt;/P&gt;&lt;P&gt;&lt;BR&gt;myChart.setDataXML("&amp;lt;chart caption=\"Monthly Sales Summary\" &amp;gt;&amp;lt;set label=\"January\" value=\"1740\" /&amp;gt;&amp;lt;set label=\"February\" value=\"19800\" /&amp;gt;&amp;lt;/chart&amp;gt;");&lt;BR&gt;</description><pubDate>Thu, 28 Feb 2008 00:13:54 GMT</pubDate><dc:creator>Sudipto Choudhury</dc:creator></item><item><title>RE: ERROR: Invalid XML encountered.</title><link>http://www.fusioncharts.com/forum/Topic3569-41-1.aspx</link><description>Just a follow up to my last post.&lt;/P&gt;&lt;P&gt;I broke down and used a regular expression to convert double quotes to single quotes, and the problem went away on Safari/Firefox (using FusionCharts.js version 1.2.1.beta).&lt;/P&gt;&lt;P&gt;It would be nice to fix this problem for all browsers.  It just doesn't seem right to have to convert perfectly valid XML into something else :)&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Sunil</description><pubDate>Tue, 15 Jan 2008 15:31:39 GMT</pubDate><dc:creator>sunil</dc:creator></item><item><title>RE: ERROR: Invalid XML encountered.</title><link>http://www.fusioncharts.com/forum/Topic3569-41-1.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;I've downloaded your fix attached to the above post.  It fixes the problem with using double quotes (") in your XML only for the IE browser.&lt;/P&gt;&lt;P&gt;On Safari (Mac) and Firefox (Windows, haven't tried Mac) I still get the "Invalid XML Data" error.&lt;/P&gt;&lt;P&gt;In addition, I also see a spurious bit of XML get added to the page.  It adds "/&amp;gt; after the chart.  I assume a double quote  in my XML is causing this too.&lt;/P&gt;&lt;P&gt;I am generating XML with Builder (Ruby on Rails).  I know the XML is valid because I can successfully generate charts when I manually embed the chart in my HTML... this works on all platforms.  But as soon as I try to render the chart w/javascript I run into this problem.&lt;/P&gt;&lt;P&gt;Any input you can provide would be appreciated.&lt;/P&gt;&lt;P&gt;Also, does this problem exist in Fusion Charts 3.0?&lt;/P&gt;&lt;P&gt;Sunil</description><pubDate>Tue, 15 Jan 2008 15:24:39 GMT</pubDate><dc:creator>sunil</dc:creator></item><item><title>RE: ERROR: Invalid XML encountered.</title><link>http://www.fusioncharts.com/forum/Topic3569-41-1.aspx</link><description>Hi, &lt;br&gt;Thanks for pointing this out.&lt;br&gt;Now you even can pass dataXML having " (which was not working erstwhile) with this new JS (attached) FusionCharts.js. Its a small fix that i added. We will release this in our next release.&lt;br&gt;&lt;br&gt;Note :Please rename FusionCharts.js.txt to FusionCharts.js.</description><pubDate>Mon, 07 Jan 2008 05:10:43 GMT</pubDate><dc:creator>Sudipto Choudhury</dc:creator></item><item><title>RE: ERROR: Invalid XML encountered.</title><link>http://www.fusioncharts.com/forum/Topic3569-41-1.aspx</link><description>Finally!!!.  Thanks for sugessting the string.  It got me thru debug faster and with shorter script.  I don't have to parse XML anymore, just send the XSL transformed string and replace the double quotes.</description><pubDate>Thu, 03 Jan 2008 07:07:12 GMT</pubDate><dc:creator>fxyekim</dc:creator></item><item><title>RE: ERROR: Invalid XML encountered.</title><link>http://www.fusioncharts.com/forum/Topic3569-41-1.aspx</link><description>One more idea, do a replace " with ' on my string using regular expression.</description><pubDate>Thu, 03 Jan 2008 01:15:19 GMT</pubDate><dc:creator>fxyekim</dc:creator></item><item><title>RE: ERROR: Invalid XML encountered.</title><link>http://www.fusioncharts.com/forum/Topic3569-41-1.aspx</link><description>Just confirmed.  FCFree has the same bug on setDataXML method.&lt;/P&gt;&lt;P&gt;&amp;lt;set label='name' value='1' /&amp;gt;, works&lt;/P&gt;&lt;P&gt;&amp;lt;set label="name" value="1" /&amp;gt;, does not work</description><pubDate>Thu, 03 Jan 2008 01:13:35 GMT</pubDate><dc:creator>fxyekim</dc:creator></item><item><title>RE: ERROR: Invalid XML encountered.</title><link>http://www.fusioncharts.com/forum/Topic3569-41-1.aspx</link><description>The setDataXML expects the string to have single quotes for the attributes.  This is Version 3.  I dropping back down to the Version2 or Free and see what happens.&lt;/P&gt;&lt;P&gt;This works.&lt;/P&gt;&lt;P&gt;myChart.setDataXML("&amp;lt;chart caption='test' decimals='0' enableSmartLabels='1'&amp;gt;&amp;lt;set label='Alchemy' value='4' /&amp;gt;&amp;lt;set label='Orion/Pegasus' value='38' /&amp;gt;&amp;lt;set label='Other' value='56' /&amp;gt;&amp;lt;set label='SandCraft' value='34' /&amp;gt;&amp;lt;set label='Scalable Processor Solutions' value='57' /&amp;gt;&amp;lt;/chart&amp;gt;");&lt;/P&gt;&lt;P&gt;This does not work.&lt;/P&gt;&lt;P&gt;myChart.setDataXML('&amp;lt;chart caption="test" decimals="0" enableSmartLabels="1"&amp;gt;&amp;lt;set label="Alchemy" value="4" /&amp;gt;&amp;lt;set label="Orion/Pegasus" value="38" /&amp;gt;&amp;lt;set label="Other" value="56" /&amp;gt;&amp;lt;set label="SandCraft" value="34" /&amp;gt;&amp;lt;set label="Scalable Processor Solutions" value="57" /&amp;gt;&amp;lt;/chart&amp;gt;');</description><pubDate>Thu, 03 Jan 2008 00:49:42 GMT</pubDate><dc:creator>fxyekim</dc:creator></item><item><title>RE: ERROR: Invalid XML encountered.</title><link>http://www.fusioncharts.com/forum/Topic3569-41-1.aspx</link><description>I tried passing doc.xml.toString().  did not work.&lt;/P&gt;&lt;P&gt;I tried removing the xml declaration, the example for setDataXML did not have it.  did not work.&lt;/P&gt;&lt;P&gt;I tried passing the string from xsl transform without the declaration.  still did not work.&lt;/P&gt;&lt;P&gt;The error says malformed XML.  This is the string I'm setting.  I pasted this string in, and still did not work.&lt;/P&gt;&lt;P&gt;'&amp;lt;chart caption="test" decimals="0" enableSmartLabels="1"&amp;gt;&amp;lt;set label="Alchemy" value="4" /&amp;gt;&amp;lt;set label="Orion/Pegasus" value="38" /&amp;gt;&amp;lt;set label="Other" value="56" /&amp;gt;&amp;lt;set label="SandCraft" value="34" /&amp;gt;&amp;lt;set label="Scalable Processor Solutions" value="57" /&amp;gt;&amp;lt;/chart&amp;gt;'</description><pubDate>Thu, 03 Jan 2008 00:32:13 GMT</pubDate><dc:creator>fxyekim</dc:creator></item><item><title>RE: ERROR: Invalid XML encountered.</title><link>http://www.fusioncharts.com/forum/Topic3569-41-1.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;Can you try passing the XML as String using toString().</description><pubDate>Thu, 03 Jan 2008 00:04:22 GMT</pubDate><dc:creator>Sudipto Choudhury</dc:creator></item><item><title>RE: ERROR: Invalid XML encountered.</title><link>http://www.fusioncharts.com/forum/Topic3569-41-1.aspx</link><description>Alright, now I know the problem with document.write(), it's doesn't work for XML.&lt;/P&gt;&lt;P&gt;Now, I'm using the DOM to parse the string returned by an XSL transform.  I then use the xml of the returned DOM object as the setDataXML.  Now I get a different error message:&lt;/P&gt;&lt;P&gt;ERROR: Invalid XML encountered. The XML declaration is not properly terminated. &lt;/P&gt;&lt;P&gt;How can that be, the xml was created by DOM?</description><pubDate>Wed, 02 Jan 2008 23:36:37 GMT</pubDate><dc:creator>fxyekim</dc:creator></item><item><title>ERROR: Invalid XML encountered.</title><link>http://www.fusioncharts.com/forum/Topic3569-41-1.aspx</link><description>I'm pulling db generated xml and using xslt to transform it to FC readable XML.  The output xml is written to a webpage by document.write(fc_xml).  This page is then used as the URL for dataURL.&lt;/P&gt;&lt;P&gt;The content is not visible if fc_xml is loaded, but the source listing is correct.&lt;/P&gt;&lt;P&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;BR&gt;&amp;lt;chart caption="test" decimals="0" enableSmartLabels="1"&amp;gt;&lt;BR&gt;&amp;lt;set label="Alchemy" value="4" /&amp;gt;&lt;BR&gt;&amp;lt;set label="Orion/Pegasus" value="38" /&amp;gt;&lt;BR&gt;&amp;lt;set label="Other" value="56" /&amp;gt;&lt;BR&gt;&amp;lt;set label="SandCraft" value="34" /&amp;gt;&lt;BR&gt;&amp;lt;set label="Scalable Processor Solutions" value="57" /&amp;gt;&lt;BR&gt;&amp;lt;/chart&amp;gt;&lt;/P&gt;&lt;P&gt;I always get this error: "ERROR: Invalid XML encountered. A start-tag is not matched with an end-tag. Click the above "dataURL Invoked" link to see the XML in browser Or check the XML data provided."&lt;BR&gt;</description><pubDate>Tue, 01 Jan 2008 18:18:28 GMT</pubDate><dc:creator>fxyekim</dc:creator></item></channel></rss>