hi...
i have a small situation where i'm trying to get the text for the
"parent"/top item...
i'm trying to use html::treebuilder as the parsing app...
the html is:
.
.
.
<tr class="tbon"> @0.1.1.0.0.0.2.1.0.0.0.3.1
<td colspan=7> @0.1.1.0.0.0.2.1.0.0.0.3.1.0
<p class="tbtx"> @0.1.1.0.0.0.2.1.0.0.0.3.1.0.0
<span class="em"> @0.1.1.0.0.0.2.1.0.0.0.3.1.0.0.0
"ACCA 310F "
<span class="on"> @0.1.1.0.0.0.2.1.0.0.0.3.1.0.0.0.1
"FOUNDATIONS OF ACCOUNTING"
" A A "
<b> @0.1.1.0.0.0.2.1.0.0.0.3.1.0.0.2
.
.
.
i'm trying to figure out how to access/print "ACC 310F" as a separate
element...
using:
@span_tree = $tbtx_tree[0]->look_down("_tag"=>"span");
print "tree span = ". $span_tree[0]->parent()->dump() ."\n";
generates:
<span class="em"> @0.1.1.0.0.0.2.1.0.0.0.3.1.0.0.0
"ACCA 310F "
<span class="on"> @0.1.1.0.0.0.2.1.0.0.0.3.1.0.0.0.1
"FOUNDATIONS OF ACCOUNTING"
i appear to be having an issue with my approach given that both tags are
"spans".. any way to separate them...
i can get the "FOUNDATIONS..." by simply looking at $span_tree[1]...., but
$span_tree[0] appears to contain both spans.. any way to separate them...
any ideas/comments/criticisms/etc.. would be appreciated...
thanks
-bruce