Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Moving a tag within text with XML::Twig

by Tanktalus (Canon)
on Sep 25, 2005 at 15:08 UTC ( [id://494910]=note: print w/replies, xml ) Need Help??


in reply to Moving a tag within text with XML::Twig

First off, to find all of those tags, you should check get_xpath:

my @foots = $document->get_xpath('//text:span[@text:style-name="footno +te reference"]');
Way simpler than rolling your own ;-).

Rather than using subs_text, you may just want to use set_text to set the text to whatever you've already figured out. But I think your idea is sound - you want to remove some text from one side, and add it to the other.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-25 23:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found