> I'm using XML::Simple to parse some xml..
This is the first error: see XML::Simple needs to go! and the very beginning of the module iself to know why.
Different valid options are on CPAN to safely parse XML: i choosed XML::Twig and I'm happy with it (but still unhappy with XML in itself!)
XML::Twig has a lot of features and tutorials on the author website.
Next times give us a short sample of your data to make it easier to help you.
I'd go with something like
use strict; use warnings; use XML::Twig; my $t= XML::Twig->new( pretty_print => 'indented', twig_handlers => { # $_[1] is the elemen +t 'results_link' => sub{ $_[1]->print;} }); my $data =<<EOXML; <?xml version="1.0"?> <!DOCTYPE stats SYSTEM "stats.dtd"> <results_link>https://myserver.com/app/search?q=%7Cloadjob%20scheduler +_amJ1bGxvdWdoQGRldi1hbWVyaWNhZmlyc3QuY29t_at_1496880600_682%20%7C%20h +ead%2020%20%7C%20tail%201&earliest=0&latest=now</results_link +> EOXML $t->parse( $data);
L*
In reply to Re: & and XML::Simple
by Discipulus
in thread & and XML::Simple
by Jazz-jj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |