On 05/08/2013 06:24 PM, José Matos wrote:
On Wednesday 08 May 2013 17:43:41 Richard Heck wrote:
Thinking ahead, however: Should we use some SAX library to read the XML? Or 
should we just adapt the Lexer for this purpose?

Richard
Lars had that working for a previous version of lyx with lexer. His branches 
are still available in git, I think...

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.

Richard

Reply via email to