Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1083967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:30:09+00:00 2026-05-16T22:30:09+00:00

Possible Duplicate: Why am I getting an “Out of memory” error with Perl's XML::Simple?

  • 0

Possible Duplicate:
Why am I getting an “Out of memory” error with Perl's XML::Simple?

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 the error message Ran out of memory.

Are 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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T22:30:09+00:00Added an answer on May 16, 2026 at 10:30 pm

    There are two types of XML Parsers available:

    • simple ones that read the whole XML
      file into memory and generate an easy
      accessible data structure, this takes
      a rather big amount of memory so
      you’ll get into trouble with bigger
      files. Their advantage is that they
      are usually very easy to work with.

    • the SAX based parsers which process
      the XML element by element. To work
      with this parsers the developer
      (you!) has to register callbacks for
      every interesting element and work
      with the information from the
      callbacks. Everytime the SAX parser
      encounters a given element the
      associated callback is executed and
      you are able to only work with the
      interesting tags rather the whole
      file at once. This parsers keep the
      memory usage (potentially) very low
      but require substatially more work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.