i am trying to read an XML from SD card in jQuery function .. the html file is loaded in webView of android device...here is what i am trying
<script type="text/javascript">
$(document).ready(function(){
$("#dvContent").append("<ul></ul>");
$.ajax({
type: "GET",
url: "file:///mnt/sdcard/RegInfo/output/data.xml",
dataType: "xml",
success: function(xml){
$(xml).find('Book').each(function(){
var sName = $(this).find('Name').text();
var sEmail = $(this).find('Email').text();
$("<li></li>").html(sName + "-" + sEmail).appendTo("#list");
});
},
error: function() {
alert("An error occurred while processing XML file.");
}
});
});
</script>
there is something wrong with the file url but i am not being able to figure out the problem... The code is working fine with desktop browser . . . and i am not using PhoneGAp.js or Cordova.js