YUI().use('node', 'event', 'yql', function(Y) {
var news_url = 'http://lyrics.wikia.com/Arcade_Fire:Wake_Up';
var yql_query = "select * from html where url='" + news_url +"'";
yql_query += " and xpath=\"//div[@class='lyricbox']\"";
Y.YQL(yql_query, function(response) {
if(response.query.results){
alert(
response.query.results.div.p.content.split(' \n ').join('<br />')
);
/* presentation logic accessing
to response.query.results.div.p.content */
} else{ /* error handling */ }
});
});
not sure what you want to do with the html, so i alert for now...