c++ - Using Boost to read and write XML files -


Is there an old way (and there is a simple way too) to use the Boost to read and write XML files?

I can not find any simple samples for reading XML files using Boost. Can you point me a simple sample that uses Boost to read and write XML files?

If there is no boost, can you recommend that there is a good and easy library for reading and writing XML files? (It should be a C ++ library)

You should light weight, simple and fast XML parser for C ++

The best thing about pugixml is XPath support, which is a lack of TinyXML and RapidXMM.

While referring to the author of Rapid XML, "I would like to thank Arseni Koupakkin for my work on Pugixml, which was the inspiration for this project" and "5% - 30% more than PagicSchel Fast, I know that the fastest XML parser, "he had tested against version 0.3 of PgxSm, which recently reached version 0.42.

Here are a few excerpts from Pixxml documentation:

The main features are:

  • Low memory consumption and fragmentation (win) more than Pugxml ~ 1.3 times , TinyXML - ~ 2.5x, Zeris (Dome) - ~ 4.3 times 1). Exact numbers can be seen in comparison with the existing parser section.
  • Extremely high parsing speed (Win on pugxml ~ 6x, TinyXML - ~ 10x, Xeros-Dom- ~ 17.6 times 1
  • Very high parsing speed (well, I am repeating myself, but it is very fast, it expands Xpayer by 2.8 times more than this exposure) 2
  • More or less standard-conformant (this will exclude any DTD related issues Parse a standard-compatible file)
  • Too many error-A (This is nothing else like you and me, like the expat, it will parse the files, data in the wrong encoding, and so on)
  • Clear interface (one of a heavily refracted puggymile) < / Li>
  • More or less unicode-aware (in fact, this data considers the input of UTF-8 encoding, although it will work smoothly with ANSI - Assistant Conversion Functions (UTF-8 & lt; -> UTF -16/32 (which is the default for std :: wstring & amp; ), No UTF-16 for now (see work for future); Wchar_t))
  • Fully standard compliance C ++ code (approved by Emu strict mode); Library is multipalaté (see Reference for Platform List)
  • High Flexibility You can control many aspects of file parsing and dom tree building through parsing options.

OK, you can ask - what's the catch? Everything is so cute - it's a small, fast, strong, clean solution to parse the XML. What is missing? Well, we're the right developers - so here's an inaccurate feature list:

  • Memory consumption knows every dome-based parser I know - but when the SAX Parser arrives have no chance. You can not process the 2 GB XML file with less than 4 GB of memory - and make it faster - though Pagnichem behaves better than all other DOM-based parsers, so if you are sticking to the DOM, So this is not the problem.
  • The memory consumption is fine, I'm repeating myself again. When other parsers allow you to provide an XML file in a stable storage (or even as a storage mapped area), the pagicum will not be there. So you have to copy the entire data to a non-static collection. Apart from this, it should be continued during the life of the parser (more information about the cause and the life span is written below). Again, if you are fine with DOM - this should not be a problem, because overall memory consumption is low (well, although you will need an adjacent block of memory, which can be a problem).
  • Validation of verification, DTD processing, XML namespace, proper control of encoding if you need them - take MSXML or Excercise or anything else.

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -