mark,
the following is close. i played around with a number of different
approaches, and i have a basic question...
#######################
my @sectionTRs = $doc->findnodes('//[EMAIL PROTECTED]"sectionheading"]]');
foreach $section (@sectionTRs) {
my $nextTR = $section->nextSibling();
my @keys = $nextTR->findnodes('td/strong');
my @values = $nextTR->findnodes('td/text()');
# save keys and values
}
#######################
how do i view the actual underlying html for the nextTR/key/value...
when dealing with libxml, how can i display/print out/dump what i'm looking
at.
various methods produce XML::LibXML::NodeList, XML::LibXML::Element, etc...
but i can't find any way to print/display the underlying html/text for a
given element.
my question, is there a way to "convert" the node/nodelist/element to
html... or am i essentially hosed!!
the basic reason for the question is to try and be able to switch between
using libxml/xpath and treebuilder methods as i'm parsing html docs...
searches of google/cpan haven't turned up a working solution...
thanks..
-bruce