in reply to Accessing outside variable using XML::Twig
You may find the replies to Passing additional arguments to XML::Twig handlers of interest.
Super Search is your friend - try the search ?node_id=3989;HIT=XML%3A%3ATwig;re=N;Wi