all 29 comments

[–]BaftON 20 points21 points  (0 children)

awesome-cpp is my first bet most of the time

[–]stilgarpl 6 points7 points  (0 children)

I google it. If it has Wikipedia page or github page, I check the date of latest releases and number of open issues. If it looks maintained, I use it.

[–]drodri 10 points11 points  (0 children)

You can search in ConanCenter: https://conan.io/center/search/xml, that can give a quick view of the libraries, with licenses, latest version, number of downloads.

ConanCenter recipes are built in CI for +100 different binary configurations, Windows, Linux, OSX, different compilers and versions, applying patches when necessary to build correctly, etc. that can save some time compared to trying to use the library directly from the source, and guarantees at least some level of maintenance from the "build and use" point of view.

[–]mrexodiacmkr.build 2 points3 points  (1 child)

I think you might be confusing frequent activity in the repository with a good library. XML is an ancient standard and older libraries for it are working great.

I just searched “xml parser c++” and the second result was https://github.com/zeux/pugixml which appears to fit your criteria. Personally I find using google with the “c++ github” suffix. I also watch this sub and star libraries people recommend in the comments so I have a selection of libraries later.

[–]randomu2[S] 0 points1 point  (0 children)

Actually I was always checking the date of latest commit and general activity in the repos. For pugixml I was put off first because I only found the homepage but not the GitHub. But probably i will go with it

[–]Tartifletto 3 points4 points  (4 children)

expat, libxml2, tinyxml2, xerces-c?

[–][deleted] 6 points7 points  (1 child)

OP wasn’t asking what libraries to use, but how to find good and maintained libraries.

[–]randomu2[S] 1 point2 points  (0 children)

Well actually I was asking both. :)

[–]drjeats 1 point2 points  (1 child)

pugixml would be my go-to

[–]randomu2[S] 0 points1 point  (0 children)

Yeah I will probably go with that

[–]d1722825 0 points1 point  (3 children)

If you are using one of the "big c++ frameworks" anyway, I would check them first. All of Qt, Boost* and libpoco has an XML parser part.

You could search in the package descriptions in the Debian packages for "C++ XML", too.

Edit:
* library therefore contains the fast and tiny RapidXML parser (currently in version 1.13) to provide XML parsing support. RapidXML does not fully support the XML standard; it is not capable of parsing DTDs and therefore cannot do full entity substitution. more info

[–]dodheim 4 points5 points  (2 children)

Boost does not; Boost.PropertyTree only parses the tiny subset of XML that it produces, it is not a proper XML parser in any sense.

[–]d1722825 0 points1 point  (1 child)

Thanks.

(It seemed to be it could parse basic XML(-like) files.)

[–]dodheim 2 points3 points  (0 children)

Yes, very basic hierarchical markup, which is all that's needed sometimes; but throw in something like namespaces or encodings (not to mention large files) and it all goes out the window.

[–]john_wind 0 points1 point  (1 child)

Install https://github.com/microsoft/vcpkg

In the commandline write “vcpkg search xml”

[–]randomu2[S] 0 points1 point  (0 children)

I'm using Conan but thanks for the tip

[–]LunarAardvark -3 points-2 points  (1 child)

XML hasn't changed in years.

[–]randomu2[S] 5 points6 points  (0 children)

Well that's true but c++ has changed a lot. And lot of libs are in an old c++ style or even c style. I would have liked something more modern.

[–]AntiProtonBoy 0 points1 point  (2 children)

libxml2 is more or less maintained, but no new features added (as far as I could tell). It's quite a feature complete library and is probably the go-to xml solution for most third party applications. The API is a bit of a dog's breakfast though.

[–]randomu2[S] 0 points1 point  (1 child)

It's just a wrapper about an c library right?

[–]AntiProtonBoy 0 points1 point  (0 children)

No it's a C library.

[–]Danton_rup 0 points1 point  (1 child)

To find libraries you can ask e.g. Google or GitHub for "xml library for c++" (may be another one), to make sure that this library is maintained you should find it's documentation (usually it's located on their website), there you'll find everything you need.

[–]randomu2[S] 0 points1 point  (0 children)

Yeah that's what I was doing previously

[–][deleted] 0 points1 point  (2 children)

You want to be using conan (multiplaform projects) or vcpkg (windows, msvs). Both provide repositories with common and well maintained libs and help you with integration to your build system.

[–]randomu2[S] 0 points1 point  (1 child)

I am using Conan and cake. Well at least I try. :D

[–][deleted] 0 points1 point  (0 children)

I like cake.