Richard Lee wrote:
Chas. Owens wrote:
On Sat, Nov 15, 2008 at 16:27, Richard Lee <[EMAIL PROTECTED]> wrote:
snip
           if ( $bay1->att('id' eq 'kingtony' ) ) {
snip

I think you mean to say

if ($bay1->att("id") eq "kingtony") {

yes, that was a typo...
I changed to

my $sabal = new XML::Twig(
             twig_roots          => {
                    'foo/yahoo'  =>
                    #'[EMAIL PROTECTED]"kingtony"]'   =>
                        sub {
                            my ($yabal, $element ) = @_;
if ( $yabal->first_child('bayking_list')->first_child('bayking')->att('id') eq 'kingtony' ) {
                                    $element->print;
                            }
                         }
             }
);

$sabal->parse($xml);

but still no luck..

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to