android - Loading an XML file from SD card in jQuery Function -
i trying read xml sd card in jquery function .. html file loaded in webview of android device...here 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 wrong file url not being able figure out problem... code working fine desktop browser . . . , not using phonegap.js or cordova.js
Comments
Post a Comment