views:

59

answers:

1
  1. when i store my kml string to databse,i be this :

alt text

2.

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2"&gt;
  <Placemark>
    <name>Simple placemark</name>
    <description>Attached to the ground. Intelligently places itself 
       at the height of the underlying terrain.</description>
    <Point>
      <coordinates>-122.0822035425683,37.42228990140251,0</coordinates>
    </Point>
  </Placemark>
</kml>

so how to change it using jquery or javascript

+1  A: 

The data displayed in your pop-up is double-encoded xml. The original xml file was re-encoded as if it's going to be embedded inside another xml (or html) document.

Beyond that, there isn't enough information about what you're doing to know where the problem occurred (or even if there really is one).

Sam
Sam, It's probably not double encoded, but rather HTML encoded data displayed in a JavaScript popup. JavaScript requires a different encoding method than other HTML does...
atk
@atk, you're right, JavaScript requires a different encoding than HTML. The sample shown is HTML/XML encoded. Not JavaScript encoded. There are a few options for JS encoding, one would look like this: `<?xml version=\x221.0\x22 encoding=\x22UTF-8\x22?>\x0D\x0A<kml`
Sam