Issue with XML and jquery

Issue with XML and jquery

Hi,

I have a list of records where I want to be able to click on each, edit them then update the database with edited record. When I click each 'ID' field, it should search the database with 'where ID=$_GETID' and create a XML record with each column.

I managed to get a similar function working a few weeks ago, but I cannot understand why the hell this will not work! 

Jquery:

$('#manage_tasks_box').find('#manage_tasks_box_table').column(0).click(function() {
var ID = $(this).text();
//alert(ID);
var url = "xml-task-data.php";
$.get(url, { ID: ID }, fillinform);
});
function fillinform(ID) {
xmlDoc = $.parseXML( ID );
xml = $( xmlDoc );
  $('#allocatedto_edit').val(xml.find('allocated_to').text() );
  $('#subject_edit').val(xml.find('subject').text() );
  $('#deadline_edit').val(xml.find('deadline').text() );
  $('#ID_edit').val(xml.find('ID').text() );
  $('#created_edit').val(xml.find('created_by').text() );
  $('#notes_edit').val(xml.find('notes').text() );
  $('#priority_edit').val(xml.find('priority').text() ); 
  
 
$('#task_edit').fadeIn();
  } // end of fillinform

php/xml:

<?php require_once("inc_connection_form1.php"); $query = "SELECT * FROM nicktest WHERE ID = '$_GET[ID]'";
echo $query."<br/>"; $result = mysql_query($query) or die(mysql_error());
echo '<?xml version="1.0" encoding="utf-8" Content-Type: text/html' echo "<record>"; while($row = mysql_fetch_assoc($result)) { foreach ($row as $key => $value) { echo "<$key>$value</$key>"; } echo "</record>"; } 


The script runs through to the  fillinform function, but stops at the line with xmlDoc = $.parseXML( ID );

Am I missing something here? Rather confused!

Thankyou