links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Last updated at 5:10 am UTC on 10 May 2018
Outdated, see XML: Parsers


stéphane ducasse February 02, 2005 I'm trying to understand how to use Yaxo and I cannot figure out what is the difference between the SAXDriver and SAXHandler. ... Does anybody has an example?

More on YAXO: XML: Parsers

David Shaffer SAX is an event drive API for processing XML documents. While java-based it is relatively standard across languages. There are several Java resources but here's one which helped me: http://www.saxproject.org/

Most implementations of SAX (including the one included with the "full" 3.7 image) are mostly "2.0" compliant which seems to me including XML namespaces (someone correct me if I'm wrong here) so the sample code on these pages which specifically deals with namespaces also transfers well to Smalltalk. As for Smalltalk examples, well, look at the subclasses of SAXHandler...one of these uses SAX to build the somewhat standard DOM tree. So, one has two choices when dealing with XML: event drive with SAX (usually, but not always, building the tree yourself) or DOM where the XML tree gets build from generic components (XMLElements).

Vanessa Freudenberg For quick results I just use the XMLDOMParser. Open an explorer on this:
XMLDOMParser addressBookXMLWithDTD
Then you can traverse the resulting XMLDocument tree and extract whatever you need.

How to access the Desktop and Network Paths in Windows Where does one download YAXO from? http://kilana.unibe.ch:8888/XMLSupport/XML-Parser-mir.2.mcz

How To Use DOM XML

NOTE: I'm not sure who wrote the orginal example. I found it on the coweb.

You have got 2 flavor's of xml parsers. One is SAX and the other is DOM. SAX parses an xml file line by line and it's more dynamic where as DOM reads the entire file and build a tree out of it.

Continue reading how to use the DOM XML with

Writing and reading an XML file