in reply to Re: How do I set an element in XML:RSS element as CDATA?
in thread How do I set an element in XML:RSS element as CDATA?
#!/usr/bin/perl use XML::RSS; my $description = "<b>How do I get this to be CDATA?</b>"; my $rss = new XML::RSS (output=>'2.0'); $rss->channel( title => "Sample RSS Feed", 'link' => "http://www.somewhere.com", description => "Example Feed", ); $rss->add_item( title => "Test", 'link' => "http://www.testitem.com", description => "<![CDATA[$description]]>", ); print $rss->as_string();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How do I set an element in XML:RSS element as CDATA?
by ikegami (Patriarch) on Jan 09, 2012 at 18:10 UTC |