Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Re: XML::Parser Tutorialby mirod (Canon) |
on Mar 07, 2001 at 21:29 UTC ( [id://62786]=note: print w/replies, xml ) | Need Help?? |
The problem is probably that XML::Parser is an object factory: it generates XML::Parser::Expat objects with each parse or parsefile call. The handlers then receive XML::Parser::Expat objects and not XML::Parser objects. There is a way to store data in the XML::Parser object and to access it in the handlers though: use the 'Non-Expat-Options' argument when creating the XML::Parser:
This is certainly ugly but it works! Update: note that the data is still stored in the XML::Parser object though, as shown by this code:
Which outputs:
In Section
Tutorials
|
|