Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • SAX is complicated purely because it deals with XML at a low level, and XML is actually quite complicated. As with XML, the trick lies is using just that portions you need. SAX, because it is so low-level, should be built upon so it does not have to be used directly. Assembling SAX filters to form pipelines and more complicated beasties is quite easy, and there are an ever growing number of filters to make it so you *don't* have to mess with SAX internals directly.
    • I'm not sure that that suffices to make it qualify as complex. In the vast majority of cases (ie >95%) I only need two things from SAX: elements and character data.

      The reason I find SAX simple is because you can simply ignore what you don't care about. It only gets complex when you want to deal with complex XML.

      In that respect, I'd call it more complete than complex. Easy things easy and all that ;)


      -- Robin Berjon []

      • How much would I have to change if I wanted to make things so that each SAX filter was actually run from within a standalone daemon servicing a reliable message queue. It's also a requirement that each daemon should be able to serve as a filter in different filter pipelines.

        I'm not saying that this should be easy to implement, but the Pipeline API that I've been envisaging should at least make things so that I only have to change the transport model and all the other stuff will remain untouched.

        I don't w
        • I don't want to think in terms of receiving one event and emitting multiple events for later on down the line. I want to think in terms of a transaction object ...

          This is the impedence mismatch in a nutshell.

          SAX is simply a pipelineable event processor. The events are quite low level (start/end tags, blobs of text). If you want to have a pipeline that passes generic objects back and forth, then you probably don't want SAX per se -- the overhead of serialization between two SAX handlers is likely ov