sub content_handler { my ($twig, $content)= @_; if($content->{'att'}->{'type'} eq "text") { my $selfatt=$content->att_xml_string('Self'); my $expr='//box[@textflowid="'.$selfatt.'"][@type="text"]'; my @tagnames = $twig->get_xpath($expr); for my $temp (@tagnames) { $fcnvar=$temp->att_xml_string('frameColorID'); # print "#$fcnvar#"; # if (!($fcnvar eq "")){ # my $expr='//color[@self="ua5"]'; # print "$expr"; # my @colorvalarr = $twig->get_xpath($expr); # print @colorvalarr; # print $colorvalarr[0]; # $fcnvar=$colorvalarr[0]->att_xml_string('pnam'); # } } } }