This project is an attempt to define an implementation of SAX using Objective C and Apple's Foundation framework. It may be portable with the GNUstep frameworks, though this has not been tested.
It also includes an example implementation of the API using the XML parser included in Apple's CoreFoundation framework.
Some code is in CVS. To get a copy for yourself, follow
these instructions.
You may want to consider checking out with the -P flag as well
as the -z3 flag.
Some general principles of the implementation have been:
Each Java class has an equivalent class in Objective C.
Informal protocols are used to define interfaces that the user (ie the application) may or may not want to implement. For example, the SAXContentHandler class in Java is now an informal protocol in Objective C. This should be more efficient, because this way the parser can avoid calling unnecessary callbacks.
Replace obvious Java-isms with more natural Objective C features. For example, the SAXException methods are completely different in Objective C, because NSExceptions are different from Java Exceptions. Another example: methods which return instance variables ("get" methods) don't include the word "get" in the Objective C method name.