SAX is not a perfect solution for all problems. For instance, it can be a bit harder to visualize compared to DOM because it is an event-driven model. SAX parsing is “single pass,” so you can’t back up to an earlier part of the document any more than you can back up from a serial data stream. Moreover, you have no random access at all. Handling parent/child relationships can be more challenging as well.
Another disadvantage is that the current SAX implementations are read-only parsers. They do not provide the ability to manipulate a document or its structure (this feature may be added in the future). DOM is the way to go if you want to manipulate a docu-ment in memory.
There is no formal specification for SAX. The interfaces and behavior are defined through existing code bases. This means there is no way to validate a SAX parser or to determine whether it works correctly. In the words of Dave Megginson, “It’s more like English Common Law rather than the heavily codified Civil Code of ISO or W3C specifications.”
Even considering these limitations, SAX does its job well. It’s lightweight, simple, and easy to use. If all you want to do is read XML, SAX will probably do what you need.