Orchestrating Transformations Using SAX

DOM is quite useful and very easy to learn, but it has some limitations with its implementation. Most notably, the DOM stores information in memory that can be a constraint when working with larger files. This can impact the speed and scalability of the program.

SAX operates in a different manner. Rather than load the XML into memory and then manipulating the stored data, SAX parses through a file and then triggers events when certain criteria are met.

SAX also tends to be a little bit more difficult to work with. The DOM is pretty simple to understand, probably because most developers are already familiar with working with object models and the tree model. SAX is a departure from this and it can take ...

Get Special Edition Using XSLT now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.