[jQuery] XML $.ajax GET IE6 Help!
I have this example working great in FF but I can't get it to work in
IE6. I've tried the XML with cdata tags and without. Can anyone see my
issue?
************
HTML:
***********
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>XML Test</title>
<script src="jquery.js" type="text/javascript" language="javascript"></
script>
<script src="browse.js" type="text/javascript" language="javascript"></
script>
</head>
<body>
<div id="widget"></div>
</body>
</html>
******************
JavaScript:
*****************
$(function() {
$.ajax({
type: "GET",
url: "books.xml",
dataType: "xml",
success: function(xmlData)
{
xmlDataSet = xmlData;
browseXML();
}
});
});
function browseXML()
{
strToAppend = " ";
$("title",xmlDataSet).each(function() {
strToAppend += "<strong>" + $(this).text() + "</strong><br />";
strToAppend += "by " + $("author",xmlDataSet).text() + "
";
strToAppend += "Publisher: " + $("publisher",xmlDataSet).text() +
"<br />";
strToAppend += "ISBN-10: " + $("isbn",xmlDataSet).text();
strToAppend += "
";
});
strToAppend += " - - -
";
$("#widget").html(strToAppend);
}
************
XML
************
<?xml version="1.0" encoding="UTF-8"?>
<bestsellers>
<book>
<title>
<![CDATA[
Plum Lovin' (A Stephanie Plum Novel)
]]>
</title>
<author>
<![CDATA[
Janet Evanovich
]]>
</author>
<publisher>
<![CDATA[
St. Martin's Press
]]>
</publisher>
<isbn>
<![CDATA[
0312306342
]]>
</isbn>
</book>
</bestsellers>
Thanks Very Much!