Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Problem in reading parsed xml using XML::Simple

by choroba (Cardinal)
on Jun 23, 2015 at 22:47 UTC ( [id://1131747]=note: print w/replies, xml ) Need Help??


in reply to Problem in reading parsed xml using XML::Simple

When I run your code, I'm getting the following output:
Value of tag1 :1 Value of tag2 :caSystemId Value of tag1 :2 Value of tag2 :gaSystemId

The exact code for the curious:

#! /usr/bin/perl use warnings; use strict; my $xml = { cmts => { STBDSG => { dsg => [ { tag1 => 1, tag2 => 'caSystemId', }, { tag1 => 2, tag2 => 'gaSystemId', } ] }}}; my $dsg_tags = $xml->{cmts}{STBDSG}{dsg}; for my $dsg (@$dsg_tags) { print "Value of tag1:", $dsg->{tag1}, "\n"; print "Value of tag2:", $dsg->{tag2}, "\n"; }
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-04-23 07:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found