Sign in to follow this  
Arindam

XML works for setDataURL but not for setDataXML

Recommended Posts

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!

Edited by Guest

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