When using javascript to build and set the XML for the USA map using setDataXML I get the error:
ERROR: Invalid XML encountered. An XML element is malformed. Check the XML data that you've provided. If you've special characters in your XML (like %, &, ' or accented characters), please URL Encode them.
However, if I copy and paste the EXACT same XML returned by the javascript into a file and use the setDataURL method, the map renders perfectly.
It seems like the problem is trying to use single quotes ( ' ) inside the elements returned from the javascript. I have tried replacing them with ' (xml encode), %27 (url encode) and ' (html encode). These ALL give errors!
Please help.
Thanks!