Phonegap RSS feeds, Javascript

前端 未结 5 1734
故里飘歌
故里飘歌 2020-12-15 14:46

I need to write a PhoneGap application (with HTML5 and JS, I don\'t need compatibility with IE) with AJAX so that it reads an RSS feed and looks up some specific information

5条回答
  •  不思量自难忘°
    2020-12-15 15:17

    What You mean jQuery can't do XML. jQuery is JavaScript and jQuery uses XMLHttpRequest while doing Ajax calls. See the name XML*. See: http://api.jquery.com/jQuery.ajax/. There is dataType param. You can pass xml to it. After that You will get dom object with all dom object methods.

    You can event use it as second param to jQuery's selectors:

    jQuery.get(url, {}, function (data) {
        var entries = $("entry", data);
        doSomething(entries);
    }, 'xml');
    

提交回复
热议问题