http://qs1969.pair.com?node_id=11135527


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]

Replies are listed 'Best First'.
Re^3: XML round-trip with comments and prolog
by pryrt (Abbot) on Jul 30, 2021 at 13:51 UTC