in reply to Using XML modules to remove XML elements

use XML::Smart ; my $xml = new XML::Smart(q` <root> <journal> <full-title>Acta Biomaterialia</full-title> <alternate-title></alternate-title> <ISSN>1742-7061</ISSN> <E-ISSN></E-ISSN> <vol-year></vol-year> <iss-vol>1</iss-vol> <start-date>01-01-1974</start-date> <target> <siteID>1</siteID> <rank>200</rank> <activate></activate> </target> </journal> <journal> <full-title>Acta Biomaterialia</full-title> <alternate-title></alternate-title> <ISSN>1742-7062</ISSN> <E-ISSN></E-ISSN> <vol-year></vol-year> <iss-vol>1</iss-vol> <start-date>01-01-1974</start-date> <target> <siteID>1</siteID> <rank>200</rank> <activate></activate> </target> </journal> </root> `); my @jornals = @{ $xml->{root}{journal} } ; foreach my $jornals_i ( @jornals ) { if ( $jornals_i->{ISSN} eq '1742-7061' ) { my $i = $jornals_i->i() ; delete $xml->{root}{journal}[$i] ; } } print $xml->data ;

Graciliano M. P.
"Creativity is the expression of the liberty".