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 365773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T13:34:09+00:00 2026-05-12T13:34:09+00:00

Is there any good way (and a simple way too) using Boost to read

  • 0

Is there any good way (and a simple way too) using Boost to read and write XML files?

I can’t seem to find any simple sample to read XML files using Boost. Can you point me a simple sample that uses Boost for reading and writing XML files?

If not Boost, is there any good and simple library to read and write XML files that you can recommend? (it must be a C++ library)

  • 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-12T13:34:09+00:00Added an answer on May 12, 2026 at 1:34 pm

    You should Try pugixml Light-weight, simple and fast XML parser for C++

    The nicest thing about pugixml is the XPath support, which TinyXML and RapidXML lack.

    Quoting RapidXML’s author “I would like to thank Arseny Kapoulkine for his work on pugixml, which was an inspiration for this project” and “5% – 30% faster than pugixml, the fastest XML parser I know of” He had tested against version 0.3 of pugixml, which has reached recently version 0.42.

    Here is an excerpt from pugixml documentation:

    The main features are:

    • low memory consumption and fragmentation (the win over pugxml is ~1.3 times, TinyXML – ~2.5 times, Xerces (DOM) – ~4.3 times 1). Exact numbers can be seen in Comparison with existing parsers section.
    • extremely high parsing speed (the win over pugxml is ~6 times, TinyXML – ~10 times, Xerces-DOM – ~17.6 times 1
    • extremely high parsing speed (well, I’m repeating myself, but it’s so fast, that it outperforms Expat by 2.8 times on test XML) 2
    • more or less standard-conformant (it will parse any standard-compliant file correctly, with the exception of DTD related issues)
    • pretty much error-ignorant (it will not choke on something like You & Me, like expat will; it will parse files with data in wrong encoding; and so on)
    • clean interface (a heavily refactored pugxml’s one)
    • more or less Unicode-aware (actually, it assumes UTF-8 encoding of the input data, though it will readily work with ANSI – no UTF-16 for now (see Future work), with helper conversion functions (UTF-8 <-> UTF-16/32 (whatever is the default for std::wstring & wchar_t))
    • fully standard compliant C++ code (approved by Comeau strict mode); the library is multiplatform (see reference for platforms list)
    • high flexibility. You can control many aspects of file parsing and DOM tree building via parsing options.

    Okay, you might ask – what’s the catch? Everything is so cute – it’s small, fast, robust, clean solution for parsing XML. What is missing? Ok, we are fair developers – so here is a misfeature list:

    • memory consumption. It beats every DOM-based parser that I know of – but when SAX parser comes, there is no chance. You can’t process a 2 Gb XML file with less than 4 Gb of memory – and do it fast. Though pugixml behaves better, than all other DOM-based parser, so if you’re stuck with DOM, it’s not a problem.
    • memory consumption. Ok, I’m repeating myself. Again. When other parsers will allow you to provide XML file in a constant storage (or even as a memory mapped area), pugixml will not. So you’ll have to copy the entire data into a non-constant storage. Moreover, it should persist during the parser’s lifetime (the reasons for that and more about lifetimes is written below). Again, if you’re ok with DOM – it should not be a problem, because the overall memory consumption is less (well, though you’ll need a contiguous chunk of memory, which can be a problem).
    • lack of validation, DTD processing, XML namespaces, proper handling of encoding. If you need those – go take MSXML or XercesC or anything like that.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 271k
  • Answers 271k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can't enumerate all the available methods unless the object… May 13, 2026 at 1:48 pm
  • Editorial Team
    Editorial Team added an answer The only graph viewer for Silverlight I've seen is part… May 13, 2026 at 1:48 pm
  • Editorial Team
    Editorial Team added an answer Try calling record.start() instead of .run(). From the Java API… May 13, 2026 at 1:48 pm

Related Questions

I am using PHP and the codeigniter framework for a project I am working
Problem: I have a python script that I have running as a service. It's
I have database schema for an integration project in which I need to be
I'm currently writing a little toy assembler in c# (going through the elements of

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.