in reply to Re: XML round-trip with comments and prolog
in thread XML round-trip with comments and prolog
Note that non-ancient XML::LibXML supports the hash syntax for attributes, so you can replace your setAttribute calls with
$desiredItem->{comment} = 'edited'; ... @$newItem{qw{ MenuEntryName MenuItemName comment }} = qw{ Edit Delete created }; ... $foundNew->{comment} = 'inserted';
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
In Section
Seekers of Perl Wisdom