Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 pondering the Monastery: (11)
As of 2014-08-01 15:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (28 votes), past polls