Using the VA Smalltalk SAX parser
The SAX parser supports the same API as the DOM parser. You can use the selectors in the AbtSax-XMLReader category to set the SAX handlers that are to be overridden during parsing.
In some cases, you can use the same SAX handler to implement all required interfaces. To implement all required interfaces with the same SAX handler, use the #setAllHandlersTo: method to automatically set each of the SAX handlers. The following example shows how to invoke the SAX parser and override the ContentHandler SAX interface.
( AbtXmlSaxParser newNonValidatingParser
contentHandler: MySaxHandler new ) parseURI: 'd:\workspce\resource.xml'
The following example shows how to invoke the SAX parser and override all supported SAX interfaces.
( AbtXmlSaxParser newNonValidatingParser
setAllHandlersTo: MySaxHandler new ) parseURI: 'd:\workspce\resource.xml'.
The programmer is responsible for implementing the MySaxHandler class. This handler class should be a subclass of AbtXmlSaxDefaultHandler and can override any of the methods from that class.
For information on code page conversion methods, see Special cases.
Last modified date: 01/29/2015