I'm new to this site, but it seems like someone out there should be able to answer my question.
I've recently started using jQuery, and spent the day slamming my head against the desk trying to successfully parse an XML file and append the text to a div. After failing at this in Safari, I switched over to Firefox, and found it working perfectly! Furthermore, when I loaded the files to my server and loaded the same page in Safari, it works fine there too! It seems that Safari is having trouble parsing from a local XML file. Has anyone experienced this, and have any explanation or solution? Here's my code:
$(document).ready(function(){
$.get('datafile.xml',{},function(data){
$(data).find('item').each(function(){
var dataHolder = ($(this).find('title').text());
$('#textBox').append(dataHolder + "<br />");
});
});
});
Again, this works perfectly both locally and remotely in Firefox and also works in Safari remotely. Locally, Safari doesn't work.
If anyone wants to see the HTML file as well, let me know. It's pretty straightforward. Just a div with an id of textBox. The XML file is as well. Just a list of items and titles.
Thanks a million in advance to anyone who can help me out with this!