I am simply trying to retrieve an attribute from XML into my Perl program. However, I am having problems retrieving attributes.
I am using XML::Simple.
I can recover information fine when XML is like this:
<IdList>
<Id>17175540</Id>
</IdList>
by using this code
$data->{'DocSum'}->{'Id'};
However, when the XML is like this:
<Item Name="Title" Type="String">
Some Title
</Item>
I am not getting any data back when using the following code
$data->{'DocSum'}->{'Title'};
BTW, this is the link I am getting the XML from http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=pubmed&id=19288470