Anyone familiar with Google Maps API v3?

I am trying to put together a google map for my web site for mapping locations of my photographs.

I have put together a page which pulls data from a Mysql database, converts it to xml and then uses the xml to place markers on the map.

I also have another map which has a sidebar (which I would like on my map), but this uses an actual coded xml file to place the markers.

I thought it would be a straightforward case of replacing the ‘call’ to the xml file in the sidebar script with the ‘call’ to the ‘php’ file which generates the xml from sql in the other script.
If only life were that simple.

Here is the code:



      // original Read the data
      downloadUrl("categories.xml", function(doc) {
  var xml = xmlParse(doc);
  var markers = xml.documentElement.getElementsByTagName("marker");

//   modified read data- Change this depending on the name of your PHP file
//      downloadUrl("genxml.php", function(data) {
//        var xml = data.responseXML;
//        var markers = xml.documentElement.getElementsByTagName("marker");


        for (var i = 0; i < markers.length; i++) {
          // obtain the attribues of each marker
          var lat = parseFloat(markers[i].getAttribute("lat"));
          var lng = parseFloat(markers[i].getAttribute("lng"));
          var point = new google.maps.LatLng(lat,lng);
          var detail = markers[i].getAttribute("detail");
          var name = markers[i].getAttribute("name");
          var html = "<b>"+name+"<\\/b><p>"+detail;
		  var category = markers[i].getAttribute("category");
          // create the marker
          var marker = createMarker(point,name,html,category);
        }

        // == show or hide the categories initially ==
        show("theatre");
        hide("golf");
        hide("info");
        // == create the initial sidebar ==
        makeSidebar();
      });
    }

The code calling the ‘xml’ file is lines 1-4.
The lines I tried to replace these with which call the php file are the following 4 commented out lines. But when I comment out lines 1-4 and include these the script brakes and does not even show a map on the web page.

There is obviously other parts of the script need altering, but I’m afraid my knowledge of scripting does not extend to identifying what.

Anyone able to help?

Thanks

Solved.