The success-event returns an XML-object as well, if the content type of the called file is set to text/xml
. However, beware of that this is not possible if you're calling a file on another server - it's not cross-domain. You can only use the Request-object to call files on the same domain.
Example code that enumerats through the item
elements;
new Request({
url: '/your-rss-parser.php',
method: 'get',
onSuccess: function(responseText, responseXML) {
responseXML.getElements('item').each(function(item) {
alert(item.getElement('title').get('text'));
});
}
}).send();