Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by choroba (Cardinal)
on Jul 30, 2021 at 13:31 UTC ( [id://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 (Abbot) 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?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-23 20:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found