Problem with extracting values from xml

Hi there again all
I am having trouble with retrieving data from an xml file
Here is the code I am using can anyone tell me where my problem lies?

function GetxmlHttpObject()
var xmlHttp=null;
// Firefox, Opera, Safari
xmlHttp=new XMLHttpRequest();
catch (e)
// Internet Explorer
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
catch (e)
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
return xmlHttp;
function GetxmlHttpObject() {
  var xmlDoc = GetxmlHttpObject();
  var len = xmlDoc.childNodes.length;
 var newcoords = xmlDoc.childNodes(0).childNodes(0).firstChild.text;
 	parent.document.receiver.thepos.value = len;  

as I am very new to Javascript and AJAX I am not very familiar with the process yet and I have not been able to get the xml loaded.
Obviously I am declaring this all wrong as I receive the error that load is not a function of xmlDoc!

Hi there again I have changed tactics and am now using pototype.js
I seem to be able to get the tags though I am not sure how to access the text values of each tag.
can anyone help?

function makeMarkerXml() {
new Ajax.Request('coords.xml',
    onSuccess: function(transport){
var coordTags = transport.responseXML.getElementsByTagName('coords');
var coord =coordTags[0].text;///need to find the text and this doesn't work
parent.document.receiver.thecoord.value = 'XML child:'+coord;
    onFailure: function(){ alert('Call failed') }


var coord =coordTags[0].innerText;

Thanks though this didn’t work.
I can see the xml is loaded though firebug though I just can’t seem to work out why I can’t get the text value of each tag. I know theres nothing wrong with the xml as I can load and iterate the values in both flash AS and php.
anyone know how to retrieve the text value of a child node in xml.
Here is the xml format

<?xml version="1.0" encoding="UTF-8"?>
<coords>(-27.982240960539567, 153.4050145507813)</coords>
<description>A PHAT GIG</description>
<coords>(-28.00224937595136, 153.4269872070313)</coords>
<description>A Big Festival</description>

Your XML has a mismatched <coord> tag at the end. Fix it and this will alert the data:

<script type="text/javascript">

function createRequest() 
 var request = null;  
 try {
    request = new XMLHttpRequest();
  } catch( e ) {
    try {
      request = new ActiveXObject("Msxml2.XMLHTTP");
    } catch ( ee ) {
      try {
        request = new ActiveXObject("Microsoft.XMLHTTP");
      } catch ( eee ) {
        request = null;

 return request;

rq = createRequest();

rq.onreadystatechange = function()
 var XMLDoc;
 if( this.readyState == 4 )
  if( this.status == 200 )
   alert( this.responseXML.getElementsByTagName( 'coords' )[0].firstChild.nodeValue );
   alert('ERROR: ' + this.status + '\
' + this.statusText ) ;  
} 'get', 'coords.xml?r='+new Date().getTime(), true );

rq.send( null );