racker79 has asked for the wisdom of the Perl Monks concerning the following question:

Hi All, I need to read a fairly large XML file and I can not figure out how to go through the file. Simpel XML file I dont have a problem with.
print $data->{nsanity}->{dc_details}->{timestamp},"\n" ; print $data->{nsanity}->{dc_details}->{collector_platform},"\n" ;
This makes sense, but the XML file has another section where the under the level of dc_details there ate lots of sections of "command details" and under the there is the information which command was run and the output of that command. I like to look trough these section to figure out where I find the information I need. here are the xml file and .pl of my attempts : link you help is very much apriciated. Racker

Replies are listed 'Best First'.
Re: XML::Simple question
by Anonymous Monk on Aug 03, 2011 at 06:32 UTC
      Thank you all for your answers. Racker
      Xpath is the =only= way to go ...
Re: XML::Simple question
by Jenda (Abbot) on Aug 03, 2011 at 14:44 UTC

    Data::Dumper is your best friend when working with complex data structures. Trim the file down a little and see what do you get from XML::Simple. You may want to read Simpler than XML::Simple to see a better alternative to XML::Simple.

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.