in reply to Re: How do I get a list in a perl hash generated from an XML?
in thread How do I get a list in a perl hash generated from an XML?

This does make sense @choroba. Out of curiosity, what if my XML had more tags, for example if it looked like:
<root> <config> <build host="https://cpzdomain.local"/> </config> <ref name="abc_sia_%version1.ref%"> <func envname = "test01" objectdir = "/home/pv66" base="default_771"/> </ref> </root>
And I wanted to just make a hash as in my question for only the elements in the <ref> tag, is there anyway to do it with the XML::Simple module?

Replies are listed 'Best First'.
Re^3: How do I get a list in a perl hash generated from an XML?
by choroba (Cardinal) on Apr 20, 2021 at 11:46 UTC
    I can't help you with XML::Simple (and I don't want to). If you need advice to migrate the whole logic to XML::LibXML , though, I can be your consultant.

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]