On 05/09/2013 01:39 PM, Rob Oakes wrote:


On Thu, May 9, 2013 at 10:52 AM, Richard Heck <rgh...@lyx.org> wrote:
I just had a look at those. He had an XML parser here: http://www.lyx.org/trac/browser/lyxsvn/lyx-devel/branches/personal/larsbj/xml/src/support/xmlparser.h?rev=19478 but it appears to be based upon xmlpp, which I cannot get to compile on my machine. It's a very old library. An older version uses expat, which is pretty heavy duty. I did some googling and found this page: http://lars.ruoff.free.fr/xmlcpp/ which describes a bunch of free XML libraries and was updated 2/2012. Most of what's there is either (a) very large, like Xerces and libxml2, or else (b) a DOM-style parser, which is not what we wantm, I think. The best of the options appears to be: http://www.fxtech.com/xmlio/ which is a very lightweight (53KB source) and simple, SAX-like parser. LGPL. It is also quite old, but it compiles just fine here. Of course, it also writes XML. It could probably use some updating if we were going to use it, but the code is very simple, so this would be easy to do.

Is there a reason we would want to avoid libxml? I've found it to offer the best feature set and ease of use. It also ships with a set of excellent Python bindings, which we could incorporate into the Python we ship. Between the two, there is very little that wouldn't be possible from an XML processing standpoint.

The libxml2 sources, unzipped, are 45MB. The C++ bindings, in libxml++, are another 7.1MB. That's my main worry. The entire LyX src/ directory is only 11MB. Something that powerful also feels a bit like overkill for what we will be doing.

On Linux, of course, it is different. One would just expect this library already to be installed. But things do not work that way on the other OSs.

Richard

Reply via email to