Reputation: 348
I am trying to traverse a rss feed in which a tag is present like below
<item>
<itunes:explicit>no</itunes:explicit>
</item>
how do i get the value of itunes:explicit. i tried like below
_this = loadedData // xml data from the ajax request
$(_this).find('item').find('itunes:explicit').text()
It is not returning the text present in it.
Any way to access this ?
Upvotes: 2
Views: 442
Reputation: 324507
You need to escape the colon in your selector so that jQuery doesn't interpret the colon as a CSS pseudo-class:
$(_this).find('itunes\\:explicit').text()
Upvotes: 2
Reputation: 11028
you can directly find the thing which you want..you don't need heirarchy for that..try with this code-
$(_this).find('itunes\\:explicit').text()
Upvotes: 0