[jQuery] How do I extract XML CDATA?
I'm trying to display the description field from an RSS feed that I
don't control -- the RSS feed inserts the contents as CDATA...
<?xml version="1.0" encoding="UTF-8"?>
<channel>
...
<description><![CDATA[Has Chancellor Palpatine given the go ahead
to execute Order 66 or is the TomTom lawsuit about nothing more than
GPS?]]></description>
...
</channel>
If I remove the CDATA notation, the code below populates $summary with
the contents:
var $summary = $('<div></div>')
.html($('description', this).text());
But I get nothing when the CDATA notation is there (and
switching .html to .text has no effect).