8.9. Generalizing the Idea of Event-Based XML Processing

The event-based programming style has a long history in the field of structured document processing. Long before XML came into existence, it was a common approach to HTML processing. Python's HTML processing library, htmllib, takes an event-driven approach.

Long before HTML, the event-driven style was a common approach to SGML processing. In fact, a number of programming languages such as OmniMark and Balise have been created specifically to support the event-driven structured SGML-processing paradigm. General-purpose scripting languages such as Perl, Tcl, and indeed Python are also often used with SGML, typically using James Clark's sgmls and nsgmls parsers as event sources.[1]

[1] In my ...

Get XML Processing with Python 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.