SAXHandler issue?

Andreas Raab andreas.raab at gmx.de
Mon May 19 20:22:53 UTC 2003


Hi Chris,

I'm by no means an expert on any of this XML stuff but you may see what you
get if you run the existing XMLDOMParser on your input. If it works then
it's likely that you're getting something wrong. E.g., try to see what

	XMLDOMParser parseDocumentFrom: '<your xml goes here>' readStream

tells you.

Cheers,
  - Andreas

> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org 
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On 
> Behalf Of Chris Pettitt
> Sent: Monday, May 19, 2003 10:16 PM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: SAXHandler issue?
> 
> 
> 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