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

  • SEARCH
  • Home
  • 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 8300857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T16:42:25+00:00 2026-06-08T16:42:25+00:00

I need to extract some data from a 1 GB XML file into <key,value>

  • 0

I need to extract some data from a 1 GB XML file into <key,value> tables using ets and dets. I have searched the whole web and also in here but I did not find any simple example on how to handle big XML files.

For the beginning I just want to understand how to read the file without uploading the whole of it into memory.

  • 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-06-08T16:42:27+00:00Added an answer on June 8, 2026 at 4:42 pm

    come on ! What you need is a SAX XML parser called Erlsom. For small files, its possible to load it all into memory and then parse it as in the answer i gave to this question. But, for your case, these big files need the SAX method. The Sax examples are here.

    SAX ensures that you do not load a file into memory to parse it. The tokens that the parser gets , is what it gives to you. You will need an advanced skill of tail recursion, pattern matching and stateful programming.

    EDIT


    Now, download erlsom, and extract it into your erlang lib , a location where all built-in applications are located. Rename its extraction folder like this: erlsom-1.0. Create a file called: Emakefile in the erlsom-1.0 folder. Put this inside that file and save.

    {"src/*", [verbose,report,warn_obsolete_guard,{outdir, "ebin"}]}.
    

    The erlsom-1.0 folder, should look like this:

    erlsom-1.0
    |-doc/
    |-ebin/
    |-examples/
    |-include/
    |-src/
    |-Emakefile

    The rest of the other files do not matter. Now, open an erlang shell, whose pwd() is looking into the erlsom-1.0 folder. Run the function: make:all(). like this

    Eshell V5.9  (abort with ^G)
    1> make:all().
    Recompile: src/ucs
    Recompile: src/erlsom_writeHrl
    Recompile: src/erlsom_write
    Recompile: src/erlsom_ucs
    Recompile: src/erlsom_simple_form
    Recompile: src/erlsom_sax_utf8
    Recompile: src/erlsom_sax_utf16le
    Recompile: src/erlsom_sax_utf16be
    Recompile: src/erlsom_sax_list
    Recompile: src/erlsom_sax_lib
    Recompile: src/erlsom_sax_latin1
    Recompile: src/erlsom_sax
    Recompile: src/erlsom_pass2
    Recompile: src/erlsom_parseXsd
    Recompile: src/erlsom_parse
    Recompile: src/erlsom_lib
    Recompile: src/erlsom_compile
    Recompile: src/erlsom_add
    Recompile: src/erlsom
    up_to_date
    2>
    

    So, its done. So if the folder erlsom-1.0 is in your erlang lib, then, you can call the erlsom methods from any erlang shell whichever pwd() it may have.

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

Sidebar

Related Questions

I need to extract some data from a XML fetched online and to create
Sometimes I need to quickly extract some arbitrary data from XML files to put
i have a set of tags, from which i need to extract some data.
I have a string in c# containing some data i need to extract based
Need to extract .co.uk urls from a file with lots of entries, some .com
I need to extract a value from a hidden HTML field, have somewhat figured
I have some XML file sitting in my /bin folder (using vs2010). I would
I'm trying to extract data from an xml file. A sample of my code
I have an application that extracts data from some xml that is stored in
I need to extract some management information (MI) from data which is updated in

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.