SAXHandler issue?

Chris Pettitt cpettitt at vidigiani.dyndns.org
Mon May 19 20:16:05 UTC 2003


Hello,

I am relatively new to Squeak and Smalltalk so take everything with a
grain of salt. I have been trying to use a SAX parser in Squeak, and I
found SAXHandler.

I ran into what I think is a bug in SAXHandler parseDocumentFrom: where
the method tries to send validation: message to SAXDriver, but SAXDriver
does not have this method. I resolved this issue by changing the message
to validating: which does work with the SAXDriver.

Now I have run into what looks like a second bug in SAXDriver, in
skipSeparators. In this case, it sends nextChar an isSeperator message,
but nextChar is a String, not a Character, so "MessageNotUnderstood:
isSeparator" is raised. Here is the code I am using in
the Workspace:

data _ '<?xml version="1.0" encoding="windows-1252"
standalone="no"?><log><record>some characters</record></log>'.
stream _ ReadStream on: collection.
parser _ EventParser parseDocumentFrom: stream.

With these bugs I've come across I am starting to wonder if SAXHandler and
SAXDriver are still maintained? If not, could some one recommend a SAX
package for smalltalk? If they are being maintained is this a case of user
error?

I haven't had a chance to thoroughly debug the second issue, but if I find
that this package is still being maintained and is the recommended package
for SAX parsing in Squeak, then I will invest more time debugging the
issue.

Thanks in advance for any information that can be provided on these two
issues.

Chris



More information about the Squeak-dev mailing list