I have an XML file that I extract from the Internet and understand. One element in XML is the "content" value, which contains HTML. I am using XML :: Simple :: XMLin to parse the file:
$xml= eval { $data->XMLin($xmldata, forcearray => 1, suppressempty=> +'') };
When I use Data::Dumpera hash dump, I find myself SimpleXMLparsing HTML in a hash tree:
'content' => {
'div' => [
{
'xmlns' => 'http://www.w3.org/1999/xhtml',
'p' => [
{
'a' => [
{
'href' => 'http://miamiherald.typepad.com/.a/6a00d83451b26169e20133ec6f4491970b-pi',
'style' => 'FLOAT: left',
'img' => [
etc .....
This is not what I want. I want to just grab the content inside this post. How should I do it?
source
share