3 ms·
Yes, libxml2 is a widespread, thus mostly unproblematic choice. However pulling in a third party is not only about license. With a thirdparty library you have
by johannes1234321 4y ago
Yes, libxml2 is a widespread, thus mostly unproblematic choice. However pulling in a third party is not only about license.
With a thirdparty library you have to follow security updates (also to parts you don't need), may have build issues on some platforms you want to support (something embedded?) and so on.
If you don't need XML, but just a few xml-like tags a custom parser can be done quickly. But yes then you get to the NHI problems and what if your assumptions about XML subset were wrong ...
Personally I would lean on an XML lib (maybe libyml2, maybe qxml, maybe windows API, ... depending on context) as XML is complex, but generally adding libraries introduce their costs.