Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: XML round-trip with comments and prolog

by choroba (Archbishop)
on Jul 30, 2021 at 13:31 UTC ( #11135527=note: print w/replies, xml ) Need Help??


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 (Monsignor) on Jul 30, 2021 at 13:51 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11135527]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2022-05-26 09:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (93 votes). Check out past polls.

    Notices?