[Bioperl-l] how to parse results from Bio::Biblio

Maxim deeepersound at googlemail.com
Sat Dec 11 18:16:07 UTC 2010


Hi,

I have problems to parse XML-like results from Bio::Biblio/Bio::Biblio::IO.
I thought to use XML::Simple, but I get an error when I attempt to do it
like in below example script:

#!/usr/bin/perl -w

use Bio::Biblio;
use Bio::Biblio::IO;
use XML::Simple;
use Data::Dumper;
use strict;

my $biblio = new Bio::Biblio;
my $citation = $biblio->get_by_id ('18287711');

#print $citation;

my $xml = new XML::Simple;

my $data = $xml->XMLin($citation);

# this part works, output to me looks like it should be
print Dumper($data);
#this part does not!
print "Abstract: $data->{Abstract}";


The error:
could not find ParserDetails.ini in
/opt/local/lib/perl5/site_perl/5.8.9/XML/SAX ### I think this is not
relevant to the error as "normal" parsing of XML files works on my machine
Use of uninitialized value in concatenation (.) or string at test.pl line
21.

The line that print the dump of var1 appears to contain something that looks
like an XML file, but obviously it's not properly parsed. I guess there will
be a solution for this problem within BioPerl without the requirement to use
other modules (like XML::Simple), but I cannot figure out how to do this!

Maxim



More information about the Bioperl-l mailing list