Disadvantages of Event-Driven Parsers

Event-driven parsers have several disadvantages compared to DOM- or tree-based parsers.

Event-based parser applications are more difficult to develop than the equivalent DOM-based parser application. In an event-driven parser application, the data is pushed into the application by the parser, so the application must be prepared to accept and process the data using a series of event handler subroutines. The subroutines aren’t difficult to develop, especially after you have a sample application to use as a template, but it does require some time and effort on your part. An application built using a DOM- or tree-based parser behaves a little differently in that the parser builds a tree, and it is the responsibility ...

Get XML and Perl 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.