© Copyright 2000-2020 Source Code Online. Free Source Code and Scripts Downloads.
|Code Listing by Jeremy Dunck|
SAX is commonly used on large XML files because they don't fit nicely into core memory necessary for the friendlier DOM API.
When dealing with -really- large XML files, multiple passes over the file becomes costly.
The SAX handler in this recipe allows you to handle an XML file multiple ways in a single pass by dispatching to the handlers you supply.