I'm trying to extract values from xml using jQuery in a cross-browser compatible fashion. I'm not having any issues doing this in firefox, but unfortunately this also has to be IE compatible.
My jQuery code looks like this:
$(document).ready(function()) {
$.get("file.xml", {}, function(parseRefreshTime){
alert('This line is executed in IE.');
$("created", parseRefreshTime).each(function() {
alert('This line is *not* executed in IE.');
refreshTime = $(this).text();
//do stuff with refreshtime
});
});
});
This extracts the node value for a <created>
node in my xml file.
I'm referencing the jQuery library in my page, and it's parsing properly in Firefox, so I'm assuming that that my parsing code is appropriate. I get both alerts in Firefox, but only the first one in IE.
I could swear I had very similar code working yesterday, but I must have tweaked something and somehow broken it. After fighting with it for almost an hour now, I'm looking for another set of eyes.
Can anyone spot what I'm doing wrong here?