I have a static html page weather.html
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$.ajax({
type: "GET",
url: "http://www.google.com/ig/api?weather=Delhi",
dataType: "xml",
success: parseXml
});
});
function parseXml(xml) {
$(xml).find("weather").each(function() {
alert($(this).attr("temp_c"));
});
}
</script>
</head>
<body>
</body>
</html>
The alert doesn't seem to get displayed in the page when i inspected trough firebug i found this,
XML Parsing Error: no element found Location: moz-nullprincipal:{08ba4230-2feb-48d3-969e-b53579b07b52} Line Number 1, Column 1:
^
also function parseXml
doesn't seem to get called...