sub getCBLValue { my ($cblIn, $cbNameIn); my @cdn = undef; my $textEl = undef; my @rtnVal = undef; # return the CustomBucketValue element #** ** ** ** ** ** ** ** ** # pass in the customBucketList and the name of the # dimension to look for ($cblIn, $cbNameIn) = @_; foreach my $cb ( $cblIn->getChildNodes() ) { if ($cb->getNodeType() == ELEMENT_NODE && $cb->getNodeName() eq 'customBucket' ) { print '$cb node name: ' .$cb->getNodeName() . ' type: ' . nodeTypeText($cb->getNodeType() ) . "\n"; #scanner( $cb ); @cdn = $cb->getElementsByTagName("customDimensionName", 0); #print scalar @cdn; $textEl = $cdn[0]->getFirstChild(); if ( $textEl->getData() eq $cbNameIn ) { print "\n Assignment to rtnVal "; @rtnVal = $cb->getElementsByTagName("customBucketValue", 0); last; } } # if customBucket node } # foreach print "\n Return from getCBLValue: " ; print ( defined(@rtnVal) ? " defined \n" : " undefined \n" ); return @rtnVal; } # getCBLValue #### GSEC_SecuritySubType 1041 IssuerCountryOfDomicile US icbSubSector Banks