Is there a preferred XML parser in Haiku?

As a recurring theme in some of my past project ideas, I’m looking at importing an XML based file format from a (yet unnamed) library. SVG importing is XML based, I started looking at resurrecting an XML based programming language as a stepping-stone to a visual program editor and so on. Is eXpat or libXML2 or some other library used internally by Haiku bundled apps? If not, what is easiest to use from among those that are available?

1 Like

expat and libxml2 are available in repositories. expat is used by Cortex and icon-o-matic, libxml2 appears to be needed by Haiku only indirectly through some other dependency.

In Renga (XMPP client, that does a lot of XML) I ended up using gloox (an XMPP library) also for non-XMPP tasks, since its internal XML handling classes fit my simple needs.

In fRiSS (RSS/Atom reader) there is code to parse XML using BeAPI classes, but it is probably not fully XML and also not so great. It convert XML into BMessages and back, I think, with similar limitation to Haiku’s built-in JSON handling (not all JSON and XML files will be manageable in this way).

1 Like

Wait, Icon-O-Matic uses expat? *Gets rid of the dependency from Jamfile* Well, not anymore :joy:

I think it is (or was?) used for the SVG import or export, but maybe that was rewritten since then?

Yeah, IIRC Icon-O-Matic switched the library it used to import SVGs.