Ross,

Thanks again. I found a way to do exactly what I want using JavaScript
here: 
http://forums.devshed.com/xml-programming-19/remove-one-node-in-xml-85025.html
but it's not working at all when I try to implement it (the function
deleteMarker() won't execute). In the below code markerlatitude is the
latitude of the most recently clicked marker.

--------------------------

function deleteMarker()
{
        var markerlatitude = document.getElementById("markerlatitude").value;
        xmlDoc=loadXMLDoc("data.xml");

    xmlDoc.recordset.moveFirst();
    while (!xmlDoc.recordset.EOF)
    {
        var currentLatitude = xmlDoc.recordset("lat");

        if(markerlatitude == currentLatitude)
        {
            var remove_node = xmlDoc.selectSingleNode("/marker[lat='"
+ markerlatitude + "']");
            xmlDoc.documentElement.removeChild(remove_node);
        }
        xmlDoc.recordset.moveNext();
    }//end of while
        init();
}

function loadXMLDoc(dname)
{
var xmlDoc;
if (window.XMLHttpRequest)
  {
  xmlDoc=new window.XMLHttpRequest();
  xmlDoc.open("GET",dname,false);
  xmlDoc.send("");
  return xmlDoc.responseXML;
  }
// IE 5 and IE 6
else if (ActiveXObject("Microsoft.XMLDOM"))
  {
  xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  xmlDoc.async=false;
  xmlDoc.load(dname);
  return xmlDoc;
  }
alert("Error loading document");
return null;
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to