in reply to Help with XML::XPath
I didn't code the rest (where you find a record given a date), but if you understand references it should be straightforward after seeing how the file is parsed (with Data::Dumper). If you decide to go this route and need help pulling out the data, just ask.use strict; use warnings; use XML::Simple; # read in the XML data file open( INFILE, '<', 'xml_input_file.xml' ) or die "error opening input file!"; undef $/; # slurp mode my $infile = <INFILE>; close INFILE; # parse the XML file using XML::Simple my $dataref = XMLin( $infile ); # view the parsed data structure use Data::Dumper; print Dumper( $dataref );
|
|---|