Using XML::Parser with XML::Parser(Style=>'Subs', Pkg=>'SubHandlers')

flamencoman_at_earthlink.net
Date: 03/31/04

  • Next message: uc_sk: "Re: Query about using split...URGENT"
    Date: Wed, 31 Mar 2004 05:26:32 GMT
    
    

    Hi,

    Has any one used the XML::Parser module with the Subs style?

    The Perl documentation states:

    "Each time an element starts, a sub by that name in the package
    specified by the Pkg option is called with the same parameters that
    the Start handler gets called with.

    Each time an element ends, a sub with that name appended with an
    underscore (``_''), is called with the same parameters that the End
    handler gets called with.

    Nothing special is returned by parse."

    The problem is I don't know what the syntax is for the subroutines
    that are supposed to go in the package. I couldn't find any examples
    that show how to use this in the Perl FAQ or via a search on the net.

    Thanks,

    Flamencoman@earthlink.net


  • Next message: uc_sk: "Re: Query about using split...URGENT"

    Relevant Pages

    • Re: Help with a perl package problem
      ... package Parent; ... sub custom_func { ... handler from parent, ...
      (comp.lang.perl.misc)
    • Re: Help with a perl package problem
      ... I need the Child class to inherit the ... handler from parent, and then within the handler I need ... package Parent; ... sub handler { ...
      (comp.lang.perl.misc)
    • Help with a perl package problem
      ... THis is really a Perl problem, ... package Parent; ... sub custom_func { ... handler from parent, and then within the handler I need ...
      (comp.lang.perl.misc)
    • RXParse module v.90 (by robic0)
      ... When I release version 1 of RXParse, I anticipate that I will provide a ftp site ... sub original_content ... then call content handler with $content ... # call start tag handler with $2 ...
      (comp.lang.perl.misc)
    • CRAP CODE CHRONICLES: Xml
      ... this will be painfull for all the XML experts here on this board. ... sub original_content ... # call new_parse handler ... # call start tag handler with $2 ...
      (comp.lang.perl.misc)