Using Keith Woods vendor/parser with the SAX
interfaces can give range check errors during the
parsing. The problem is the SkipBlanks local procedure
inside the ExtractParameters procedure in the
ParserBase unit. SkipBlanks can be called with Posn =
Length(Text) already, the repeat loop increments it by
one, yielding an invalid index, and the test (Posn =
Length(Text)) in the Until clause then causes the range
check error.
Fix: Replace the repeat loop with a while loop:
procedure SkipBlanks;
begin
while (Posn < Length(Text)) and (WPos(Text[Posn],
Blanks) > 0)
do
Inc(Posn);
end;
This also requires a change to the line
Posn := 0;
in the body of the ExtractParameters procedure (second
line). Change it to
Posn := 1;
Peter Below (peter.below@aventis.com)
Logged In: YES
user_id=290026
Since no one has responded, I will:
Keith Wood has not done anything on his code for a while.
I am not sure if Jeff Rafter is now the one who has taken
over from him.
If you want a native Delphi solution, go for AElfred, supported
by Jeff. If you want speed, go for Expat - supported by me.