Edited::
Hi All,
I have a XML file like this,
<message>
<c1>
<rrcConnectionSetupComplete>
<rrc-TransactionIdentifier>2</rrc-TransactionIdentifier>
<criticalExtensions>
<c1>
<rrcConnectionSetupComplete-r8>
<selectedPLMN-Identity> 1 </selectedPLMN-Identity>
<dedicatedInfoNAS> 07410109014290112345671000028020000f0 </dedicatedInfoNAS>
</rrcConnectionSetupComplete-r8>
</c1>
</criticalExtensions>
</rrcConnectionSetupComplete>
</c1>
</message>
I am using Perl code like this to access the data in xml file (i should stick on to this format of accessing)
#!/usr/bin/perl
use strict;
use XML::Simple;
my $xml = new XML::Simple;
my $data = $xml->XMLin("uL-DCCH-Message.xml");
my $rrc_trans_identifier = $data->{'c1'}->{'rrcConnectionSetupComplete'}->{'rrc-TransactionIdentifier'};
print "rrc_trans_id :: $rrc_trans_identifier\n";
my $selected_plmn_id = $data->{c1}->{rrcConnectionSetupComplete}->{criticalExtensions}->{c1}->{'rrcConnectionSetupComplete-r8'}->{'selectedPLMN-Identity'};
print "plmn identity :: $selected_plmn_id\n";
my $rrc_dedicated_info_nas = $data->{c1}->{rrcConnectionSetupComplete}->{criticalExtensions}->{c1}->{'rrcConnectionSetupComplete-r8'}->{dedicatedInfoNAS};
print "dedicated info nas :: $rrc_dedicated_info_nas\n";
The output produced is,
rrc_trans_id :: 2
plmn identity :: 1
dedicated info nas :: 07410109014290112345671000028020000f0
Perl code using XML::Simple is working fine for smaller XML files (as shown in the above output).
But If XML file is large, then XML::Simple cannot handle and it is showing error message Ran out of memory.
My question is, Is there any other XML Parsers i can use, so that i can access the elements in XML file in the similar manner as shown above ???
If there is any other parsers available, can any one give an example by following the same conventions i am following for XML::Simple..
Kindly help me, i am struggling with this