Grabbing text inside a cdatasection

21 views
Skip to first unread message

Kevin Lindsey

unread,
Nov 6, 2012, 4:51:29 PM11/6/12
to mojol...@googlegroups.com
Hi Folks,

A newbie question for you. I'm using something like the following to display the content of a style element from an xhtml document :

say $ua->get($url)->res->dom->at("style")->text;

The style element's content is wrapped in a cdatasection, so I'm seeing <![CDATA[ ... ]]> wrapped around the output. I can filter out that text easily enough, but I was wondering if there is an API call (or text variant) that I should be using to grab the actual text content inside the cdatasection node.

Thanks,
Kevin

Reply all
Reply to author
Forward
0 new messages