开发者

Problem while parsing pixdaus feed

I am trying to perform parsing of Pixd开发者_Python百科aus feed at client side using java script.

I am facing following problems:

  1. I am unable to perform parsing directly from this url: http://feeds.feedburner.com/PizdausPopularTodayPics

  2. So I tried to copy the content and save the file at this location: http://db.tt/5Zq98Kw while doing so I am unable to get content within description tags

Can anyone help me to resolve this?

The sample file which I am using to parse it can be found at: http://db.tt/MyIeYrc

Note: currently it supports parsing on firefox only.

Thanks,

Miraaj


Loading XML document from Pixdaus did not work due to 'Cross-domain' issues.

Extract description

I would rather extract the description from the document in the following way:

var desc = xmlDoc.getElementsByTagName('description');
for( var i = 0, len = desc.length; i < len; ++i ) { 
   console.log( desc[i].firstChild.nodeValue ); 
}

Hope this helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜