As long as the XML is indeed valid XML, then you have a whole slew of modules to choose from: XML
I Google'd for such XML and came up with the following code that uses XML::Simple
use strict;
use warnings;
use Data::Dumper;
use XML::Simple;
my $xml = XMLin(\*DATA);
print Dumper $xml;
__DATA__
<BarGraph xmlns="http://example.org/bargraph">
<Bar>
<Title>Portland</Title>
<Value>32</Value>
</Bar>
<Bar>
<Title>Berlin</Title>
<Value>20</Value>
</Bar>
<Bar>
<Title>Pune</Title>
<Value>16</Value>
</Bar>
</BarGraph>
Hope this helps, feel free to ammend your question with any specifics. :)
|