When I first started teaching/using YAJL (many years ago now) I discussed both the event-based and tree-based approaches.  I created "simplified" wrappers for each in YAJLR4 -- but, honestly, I never got around to testing the event-based ones... so the code there is completely untested.

Why?  Because the tree-style ones were so much easier to learn, use and teach.  I quickly found this was the only option people were really interested in.  The event-based (which is more like SAX) never sparked much interest.

As Jon said, I did use the event-based approach for the YAJLINTO program (the DATA-INTO parser).  I didn't use my "simplified wrappers", though - I called the regular YAJL C routines directly.  So that part definitely works, and you can use the code in YAJLINTO as an example.

But, I'm wondering why you wouldn't use the tree-based (or DATA-INTO/DATA-GEN) options?  These are widely used and pretty much everyone has agreed that it's easier... so, why not?

On 1/19/2022 4:14 PM, Alan Campin wrote:
Does anyone know of an example of using Scott Klement's YAJL in an event
driven mode (Like XML-SAX). There seems to be a lot of examples of using in
Tree-Mode and using Data-Into.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.