use strict; use XML::Twig; local $/; XML::Twig->new( TwigHandlers => { '/root/msg' => sub { $_[1]->set_text('Twig is easy') } } )->parse(<DATA>)->print; __DATA__ <?xml version="1.0" encoding="iso-8859-1"?> <root><msg>As a last resort XML::LibXML is also useful.</msg></root>
In reply to Re^3: Replacing things in XML files
by borisz
in thread Replacing things in XML files
by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |