I'm already parsing xml successfully but i'm stuck at getting an attribute of childrens.
XML Example:
<entries>
<entry>
<media:thumbnail url="blah" />
</entry>
</entries>
Javascript/ jQuery:
$.get('data.xml', function(d){
$(d).find('entry').each(function(){
var $entry = $(this);
var pic = $entry.find('media:thumbnail').attr('url');
})
});
That javascript doesn't work for me to get an attribute. What's the problem?