Next in thread → Next in month →

Re: [xml-dev] More on Parsing Performance

From
Karl Waclawek <>
To
David Megginson <>,
Date
2003-02-22T19:10:07Z
ID
<001701c2daa6$0357b0a0$0207a8c0@karl>
Thread
Re: [xml-dev] More on Parsing Performance
> The most obvious alternative would have been to require all callbacks
> to return a boolean value, which would be a giant programming pain for
> the majority of applications that process the complete XML document.

I am not sure how easy this is in Java, but in Delphi/C++ one would
use a var parameter, pre-set to the most likely value, so that
in the normal case the programmer would not do anything about it.

In Java you might use a status object, whose state is preset?

> We could also have set up a method on the parser itself, but in Java
> that is much more kludgey than using an exception.

In Expat (SAX-like, but not SAX) we are going to add a status to the
callback signatures. This is for the purpose of adding a Pull API, 
while still keeping the Push API. In Pull mode the callbacks will act
as "filters" (status = Continue, Stop, Error, ...), in Push mode one
can use them directly.

Regards,

Karl
Next in thread → Next in month →