O'Reilly logo

XML and Perl by Ilya Sterin, Mark Riehl

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Developing a Custom Event Handler

There may be situations when the standard event handler modules won’t support what you need to do. For example, let’s say that you want to combine standard event handling with regular expression matching, substitutions, or state management. These are tasks that aren’t supported by the standard event handlers.

Depending on the requirements, the standard event handler may seem somewhat limited. So, to get around the limitations of the standard event handler, we can create our own SAX handler. This handler will use the SAX interface to manipulate and generate XML data. It’s very simple as long as the standard method names are used for different events. Each method can be customized to fit our needs on a specific ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required