I'm having a hard time making a Perl script to correctly parse an XML file which looks like the following:
<Report name="NAME">
<ReportHost name="UNIQUE_1"><HostProperties>
<tag name="TAG_1">tag_value</tag>
<tag name="TAG_2">tag_value</tag>
</ReportHost>
<ReportHost name="UNIQUE_2"><HostProperties>
<tag name="TAG_1">tag_value</tag>
<tag name="TAG_2">tag_value</tag>
</ReportHost>
Now, I need to be able to call those UNIQUE_n somehow, but I couldn't manage. Dumper returns a structure like the following:
'Report' => {
'ReportHost' => {
'UNIQUE_1' => {
'HostProperties' => {
'tag' => { [...]
I tried ForceArray, but couldn't make ReportHost an array and failed miserably.