in reply to How can I read in XML Attributes.
XML::Simple is what you are looking for here. The best way to work with it is to use Data::Dumper (or Data::Denter) extensively:
#!/bin/perl -w use strict; use XML::Simple; use Data::Dumper; my $doc= XMLin( './file.xml'); # you need to specify the path to the f +ile print Dumper( $doc);
Then you can start figuring out where the different parts of your XML go.
If you have repeated elements (several There for exemple) then you might want to have a look at the forcearray option. Play with it, experiment, read the doc (perldoc XML::Simple), read the review, search (and Super Search) on XML::Simple to find how other people use it here.
Good luck!
|
|---|