Edited::
Hello everybody,
I have such an XML file,
<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 use Perl code like this to access data in an XML file (I have to adhere to this access format)
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:
rrc_trans_id :: 2
plmn identity :: 1
dedicated info nas :: 07410109014290112345671000028020000f0
Perl code using XML :: Simple works fine for small XML files (as shown in the above output).
But if the XML file is large, then XML :: Simple cannot process and displays the Ran out of memory error message.
My question is: are there any other XML parsers that I can use so that I can access the elements in the XML file in the same way as shown above ???
If there are other parsers available, can anyone give an example by following the same conventions as for XML :: Simple ..
, ,