in reply to XML::Parser start handler
The way to get the data is to define another handler for Char. This is the line I would use:
Somewhere else:$parser->setHandlers(Start => \&start_handler, Char => \&handle_char);
I implement XML parsing as a state machine where a flag gets raised when I go through the start handler for a paricular element and gets lowered when I go through the end handler for that element. I know then when I am in the data handler and the flag is raised I am seeing the data for that element.sub handle_char { my ($expat, $string) = @_; ... }
I don't know that there is any other way to register for a particular element. I believe that an entity is a thing like & or < or
--blm-- If you don't like this post can you please /msg me
|
|---|