I have a XML document:
<?xml version='1.0' ?>
<Root>
<Row>
<title>Homeward Bound</title>
</Row>
<Row>
<title>Escape to Witch Mountain</title>
</Row>
....
....
</Root>
My jQuery to read the XML is:
$(document).ready(function () {
var data;
$.ajax({
type: "GET",
url: "titles.xml",
dataType: "xml",
success: function (e) {
data = e;
},
error: function () {
alert("The XML File could not be processed correctly.");
}
});
alert($(data).find("Root Row").length);
... .. .
The alert shows 0 - despite there being several records.
Is there something wrong with the way I'm reading the XML file - or is it my ".find" that is wrong?
Thanks for any help, Mark