Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Minimal XML library for C++?

Tags:

c++

c

xml

What XML libraries are out there, which are minimal, easy to use, come with little dependencies (ideally none), can be linked statically and come with a liberal license? So far, I've been a pretty happy user of TinyXML, but I'm curious what alternatives I have missed so far.

like image 767
Anteru Avatar asked Jan 11 '09 18:01

Anteru


3 Answers

expat is a very fast C XML parser (although a C++ wrapper exists) that's widely used in many open-source projects. If I remember correctly, it has very few dependencies, and it's licensed under the very liberal MIT License.

like image 165
igowen Avatar answered Sep 20 '22 10:09

igowen


I recommend rapidxml. It's an order of magnitude smaller than tinyxml, and doesn't choke on doctypes like tinyxml does.

If you need entity support or anything advanced, forget about static linking and use expat or libxml2.

like image 35
Jeff M Avatar answered Sep 23 '22 10:09

Jeff M


FWIW there is also a version of TinyXML with a more C++-like interface, called ticpp.

like image 42
Rob Avatar answered Sep 19 '22 10:09

Rob