Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Most Lite-Weight XML Parser with XPath and Wide-char Support

I want a lite-weight C++ XML parser/DOM that:

  1. Can take UTF-8 as input, and parse into UTF-16. Maybe it does this directly (ideal!), or perhaps it provides a hook for the conversion (such as taking a custom stream object that does the conversion before parsing).
  2. Offers some XPath support.

I've been looking at RapidXML, the Kranf xmlParser, and pugiXML. The first two of those might permit requirement #1 by way of a hook. The third, pugiXML, supports the #2 requirement. But none of those three fulfill both requirements.

What is the smallest (free) library that can handle both requirements?

like image 478
Brent Arias Avatar asked Oct 15 '22 05:10

Brent Arias


2 Answers

pugixml has an UNICODE branch. I guess UNICODE will be officially supported in the next version (0.6)

like image 92
Cristian Adam Avatar answered Oct 18 '22 23:10

Cristian Adam


I'd really go for TinyXML + TinyXPath... Tiny, fully UTF-8 compilant and zlib/MIT licensed. If you want a more C++'s like interface there's also TinyXML++

like image 30
Kornel Kisielewicz Avatar answered Oct 18 '22 23:10

Kornel Kisielewicz