in reply to Parsing XML - SAX events
You are using XML::Parser, which brings 2 comments: first it is NOT a SAX parser, it has its own onterface, which actually predates the SAX spec. Secondly: don't use XML::Parser! It is a very useful low-level module, but not the easiest to use.
Lots of nicer modules have been built on top of XML::Parser (or on top of other parsers) that will make your life much easier. In your case it looks like you could use XML::Simple. If you want SAX, then XML::SAX will do. Other options include XML::XPath, as mentioned by gellyfish, XML::LibXML, based on libxml2, and (of course ;--) XML::Twig.
Finally, if you are new to XML in Perl, you should probably read the Perl XML FAQ.
|
|---|