Leser: 4
4 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE eSummaryResult PUBLIC "-//NLM//DTD eSummaryResult, 11 May 2002//EN" "http://www.ncbi.nlm.nih.gov/entrez/query/DTD/eSummary_041029.dtd">
<eSummaryResult>
<DocSum>
<Id>29427659</Id>
<Item Name="Caption" Type="String">P81928</Item>
<Item Name="Title" Type="String">RPII140-upstream gene protein</Item>
<Item Name="Extra" Type="String">gi|29427659|sp|P81928|140U_DROME[29427659]</Item>
<Item Name="Gi" Type="Integer">29427659</Item>
<Item Name="CreateDate" Type="String">2003/03/28</Item>
<Item Name="UpdateDate" Type="String">2006/04/04</Item>
<Item Name="Flags" Type="Integer">0</Item>
<Item Name="TaxId" Type="Integer">7227</Item>
<Item Name="Status" Type="String">live</Item>
<Item Name="ReplacedBy" Type="String"></Item>
<Item Name="Comment" Type="String"><![CDATA[ ]]></Item>
</DocSum>
</eSummaryResult>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
my $twig= XML::Twig->new(
TwigHandlers => {
Id => \&id_Tag
}
);
#actually parse the file
$twig->parsefile($xml_file) or die "cannot parse [$xml_file]: $!";
###########################################
sub id_Tag {
###########################################
my($t, $idTag)= @_;
my $id = $idTag->first_child('Item');
$idText = $id->{'att'}->{'TaxId'};
print "TAX_ID: ",$idText,"\n";
# Release memory of processed tree up to here
$t->purge();
}
Use of uninitialized value
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
my $twig= XML::Twig->new(
TwigHandlers => {
item => \&id_Tag
}
);
###############################
sub id_Tag {
###############################
my($t, $idTag)= @_;
return unless($idTag->{att}->{Name} eq 'TaxId');
$idText = $idTag->text();
print "TAX_ID: ",$idText,"\n";
# Release memory of processed tree up to here
$t->purge();
}
4 Einträge, 1 Seite |