[jQuery] Unable To Traverse From an XML Ajax Response

[jQuery] Unable To Traverse From an XML Ajax Response


Hi,
I need to know where I am doing wrong. The ALERT message in my jquery
code doesn't seem to get hit when I put a breakpoint in firebug. The
plan is to loop through all the <TABLE> Elements in the XML response
and create a 3-column HTML table from its child nodes. Thanks in
advance.
This is my jQuery Code >> Where CategoriesList is a .NET dropdown
control:
-----------------------------
$(function(){
var selectid = "#" + '<%= CategoriesList.ClientID
%>'
$(selectid).change(function(){
$.ajax({
url: "http://localhost/ws/JQService.asmx/
GetCategories",
type: "POST",
data: "categoryid=" + category,
dataType: "xml",
success: function(xml){
$(xml).find("table").each(function(){
alert("message");
});
}
});
});
});
This is the XML returned by my web service:
---------------------------
<?xml version="1.0" encoding="utf-8"?>
<NewDataSet>
<Table>
<ProductID>16</ProductID>
<ProductName>Pavlova</ProductName>
<UnitPrice>17.4500</UnitPrice>
</Table>
<Table>
<ProductID>19</ProductID>
<ProductName>Teatime Chocolate Biscuits</ProductName>
<UnitPrice>9.2000</UnitPrice>
</Table>
</NewDataSet>