You have recognised one of the main problems with the XML::Parser API and one of the reasons coding directly to its API should be considered deprecated. If you want to take an event-based approach to your parsing, then the SAX API is a better bet. As well as being OO all the way, it's independent of the underlying parser module and allows you to take advantage of off-the-shelf filter modules.
Switching your code from XML::Parser's handler API to SAX isv not a major undertaking. For a primer, start with the introduction in the distribution or look for Kip Hampton's articles on XML.com. XML::SAX::Expat is probably the easiest SAX parser to install since you already have expat.
In reply to Re: XML::Parser and objects
by grantm
in thread XML::Parser and objects
by Ineffectual
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |