#!/usr/bin/perl -l BEGIN { $| = 1; $^W = 1; } use strict; use autodie; use warnings; use XML::Twig; my $elt =XML::Twig->new( start_tag_handlers => { _all_ => sub { print join( ' - ' => values %{ $_->atts } ); } })->parse( \*DATA ); __DATA__ <doc> <elt att="not rare">fq0</elt> <elt att="not rare">fq1</elt> <elt att="rare">fq2</elt> </doc>
In reply to Re: XML::Twig - how can I test for an attribute when the attribute value is 0?
by Khen1950fx
in thread XML::Twig - how can I test for an attribute when the attribute value is 0?
by mertserger
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |