Which was converted as:<cmts> <name field_name="Name">cts01nsocmo</name> <object field_name="Nemos Object">888</object> <vendor field_name="Vendor">xyz</vendor> </cmts>
So basically no array and 'content' was there. Where it is not working, xml is like:$VAR1 = { 'cmts' => { 'name' => { 'content' => 'cts01nsocmo', 'field_name' => 'Name' }, 'object' => { 'content' => '888', 'field_name' => 'Nemos Object' }, 'vendor' => { 'content' => 'xyz', 'field_name' => 'Vendor' }
Which was converted as:<cmts> <STBDSG> <dsg> <tag1>1</tag1> <tag2>caSystemId</tag2> </dsg> <dsg> <tag1>2</tag1> <tag2>gaSystemId</tag2> </dsg> </STBDSG> </cmts>
Update: It seems that answer to why $xst->{cmts}{STBDSG}{dsg}[0]{tag1} is getting undef is known to either KeyAttr or forcearray (or both). I am trying to find it out from them :-)'cmts' => { 'STBDSG' => { 'dsg' => [ { 'tag1' => '1', 'tag2' => 'caSystemId', }, { 'tag1' => '2', 'tag2' => 'gaSystemId', } ] },
In reply to Re^8: Problem in reading parsed xml using XML::Simple
by Perl300
in thread Problem in reading parsed xml using XML::Simple
by Perl300
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |