parse CDATA as DOM (with html tags parsed)

I am trying to use google maps openInfoWindowHtml to display data from a CDATA section in a static xml file which has html tags in it, like so:

<b>Sandi Jackson</b>, the wife of U.S. Rep. <a href=””>Jesse Jackson</a>, vs. Darcel Beavers, the daughter of former alderman and Cook County Commissioner William Beavers, in a battle of political heavyweights who have already been trash-talking.

The code looks like this:

var description = ward.getElementsByTagName(“description”)[0];
GEvent.addListener(marker, “click”, function() {
if(description.childNodes[0]){ marker.openInfoWindow(description.childNodes[0].nodeValue);

BTW, I found out a discussion about using XSLT to parse XML using Ajaxslt 0.4 in google maps mashup.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: