Load XML from xmlHttpRequest Object

Using jQuery.ajax to retrieve xml response from server.

If I try:

gridMain.parse(response);

Error returns:

this.xmlDoc.responseXML.getElementsByTagName is not a function
[Break on this error] this.async=true;this.onloadAction=fun...ngth==0 && tagName.indexOf(":")!=-1)
dhtmlxcommon.js (line 16)

If I try:

gridMain.parse(response.responseXML);

Error returns:

xml is null
[Break on this error] _process_xml:function(xml){if (!xml.d...f (xml.responseXML)t.xmlDoc=xml;else
dhtmlxgrid.js (line 754)

Xml reponse from server:

Server	Apache/2.2.16 (Win32) PHP/5.3.3
X-Powered-By	PHP/5.3.3
Content-Length	4209
Keep-Alive	timeout=5, max=87
Connection	Keep-Alive
Content-Type	text/xml
User-Agent	Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11 ( .NET CLR 3.5.30729)
Accept	application/xml, text/xml, */*
Accept-Language	en-us
Accept-Encoding	gzip,deflate
Accept-Charset	ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive	115
Connection	keep-alive
X-Requested-With	XMLHttpRequest
<?xml version="1.0" encoding="UTF-8"?>

		<rows>
			<head>
				<column id="check" width="15" type="ch" align="left" color="#f0ede9" sort="int"></column>
				<column id="line" width="28" type="ro" align="left" color="#f0ede9" sort="int">#</column>
				<column id="span" width="3" type="ro" align="left" color="#f0ede9" sort="str">#cspan</column>
		
				<column id="type" width="80" type="co" align="left" sort="str">Type
				<option value="1">Door</option>
				<option value="2">Dwr</option>
				<option value="3">Frame</option>
				<option value="4">Mull</option>
				</column>
		
				<column id="style" width="200" type="ed" align="left" sort="str">Style</column>
				<column id="qty" width="40" type="edn" align="center" sort="int">Qty</column>
				<column id="width" width="60" type="ed" align="center" sort="str">Width</column>
				<column id="height" width="60" type="ed" align="center" sort="str">Height</column>
				<column id="sqft" width="500" type="ed" align="left" sort="str">Sq. Ft.</column>
				<settings>
					<colwidth>px</colwidth>
				</settings>
			</head>
			<row id="1">
			<cell></cell>
			<cell>1</cell>
			<cell></cell>
			<cell>Door</cell>
			<cell>Square</cell>
			<cell>1</cell>
			<cell>24</cell>
			<cell>36</cell>
			<cell></cell>
			</row>
			<row id="2">
			<cell></cell>
			<cell>2</cell>
			<cell></cell>
			<cell>Door</cell>
			<cell>Square</cell>
			<cell>1</cell>
			<cell>24</cell>
			<cell>36</cell>
			<cell></cell>
			</row>
			<row id="3">
			<cell></cell>
			<cell>3</cell>
			<cell></cell>
			<cell>Door</cell>
			<cell>Square</cell>
			<cell>1</cell>
			<cell>24</cell>
			<cell>36</cell>
			<cell></cell>
			</row>
		</rows>

Try to use
gridMain.parse(response.responseText);

Technically the
gridMain.parse(response);
must work as well ( if response is an instance of XMLHTTPRequest object )

I eliminated the jquery involvement while loading the grid (send it the php path not an xmlHttpObject) and it works fine simply using gridMain.loadXML(‘path to php’). We we’re adding an unnecessary step.