Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: XML::Twig - provide additional parameters to twig_roots handlers

by remiah (Hermit)
on Sep 30, 2012 at 20:40 UTC ( #996539=note: print w/ replies, xml ) Need Help??


in reply to XML::Twig - provide additional parameters to twig_roots handlers

I guess you are looking for 4.6 A simple HTML+ converter example.You can pass your $para to your function like this.

XML::Twig->new( twig_roots => { 'div' => sub{ &div(@_,$para); }, } )->parsefile("my_file");
and use it in your function
sub div { my ($t, $elt,$para) = @_; ...
I hope I understand your intention...


Comment on Re: XML::Twig - provide additional parameters to twig_roots handlers
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://996539]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2015-07-02 00:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (25 votes), past polls