I have grabbed some XML
data using this piece of jQuery:
$.ajax({
type: "POST",
url: "siteList.xml",
dataType: "xml",
success: function(xml) {
$(xml).find('wrapper').each(function(){
$(this).find('site').each(function(){
//check whether this is the last element...
});
});
}
});
What I would like to do is:
Check whether I am parsing the last site
element from the XML
I pulled in.
edit: I cannot (as far as I'm aware), do this:
$(this).find('site').each(function(){
$(this).last(); //nope
$(this).find('site').last(); //nope
});