If it is a root node, use .filter() instead of .find().
var records = $(xml).filter(":first").attr("rows");
- http://api.jquery.com/filter/
jQuery's .find() selects by searching inside the root nodes, while .filter() selects from among the root nodes.