I'm having trouble trying to output the contents of a matched node that I'm parsing:
<div class="description">some text <br/>more text<br/></div>
I'm using HTML::TreeBuilder::XPath
to find the node (there's only one div with this class):
my $description = $tree->findnodes('//div[@class="description"]')->[0];
It finds the node (returned as a HTML::Element
I believe) but $description->as_HTML
includes the element itself too - I just want everything contained inside the element as HTML:
some text <br/>more text<br/>
I can obviously regex strip it out, but that feels messy and I'm sure I'm just missing a function somewhere to do it?