And you can't go back to see anything you looked at before, you can only go forward.
Just to clarify Paul's statement. You can't go backwards in the actual XML-based document. However, if you
save specific information that you are interested in, you can certainly refer to this information at any point in time, i.e. while you are reading the document.
This is not to be considered parsing logic though. A SAX-based parser is doing the actual "parsing" and is calling your SAX-based data processing application. In other words, your application receives callbacks from the parser, e.g. Apache Xerces, while it is parsing the document. Xerces is the parser, not your application.
Aside, the design of a particular markup language plays a significant role in how "easy" or how "difficult" it will be to write a processing application for documents marked up with the language. In the example above, there are two different types of elements which are using the same name, e.g. "course".
This kind of ambiguity should be avoided when designing a markup language, especially if the root element is involved.