in reply to How to Parse XML output?
Please, use <code> ... </code> tags not only for code samples, but for data as well.
There are several XML parsing modules on CPAN. I would recommend XML::LibXML. You can easily navigate in the XML document using XPath expressions:
#!/usr/bin/perl use warnings; use strict; use XML::LibXML; my $xml = XML::LibXML->load_xml(location => '1.xml'); my $v = $xml->findnodes('//Attribute[AttrName="ref_num"]/AttrValue') +; print "$v\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to Parse XML output?
by powermonk (Initiate) on Mar 12, 2013 at 22:03 UTC | |
by choroba (Cardinal) on Mar 12, 2013 at 22:40 UTC | |
by Anonymous Monk on Mar 12, 2013 at 22:36 UTC |