in reply to xml::twig and node names

You mean you want something like this:

foreach my $scheine (@scheine){ if( $scheine->name eq "fk3101") { print "Fall : " . $element->id . " name : " .$_->att( 'V') } }

The important part is using foreach my $scheine (@scheine), name returns the name of the element, and I changed the way to output the message because I could not get myself to type it (or even cut-n-paste ;--) it the way you wrote it, it feels just wrong.

Replies are listed 'Best First'.
xml::twig and node names
by m0ve (Scribe) on Sep 21, 2007 at 07:45 UTC
    Re^2: xml::twig and node names
    by m0ve (Scribe) on Sep 18, 2007 at 08:27 UTC
      .$_->att( 'V') doesn't work
      but ( $scheine->name eq "fk3101")?(print  " name : " . $scheine->{att}->{V}):();
      does what i want,
      thx for the hint on foreach =)