in reply to Re: Search and Replace in XML
in thread Search and Replace in XML

seems easy using the rules. but never worked with XML::RULES, would it be simple to learn fast?

Replies are listed 'Best First'.
Re^3: Search and Replace in XML
by Jenda (Abbot) on Sep 14, 2009 at 22:50 UTC

    Depends. If you are used to passing subroutine references around or to a declarative style of programming it should be a no-brainer. If you are set on the procedural thinking, it takes some brain rewiring. In this particular case the implementation really is simple. You load the module, you define the object with just a single custom rule that copies the $_[1]->{EXT} to $_[1]->{_content} and returns the $_[0] => $_[1] pair and then call the filter() or filterfile() method. It's all documented. Try and ask if you do not understand something or if something does something unexpected.

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.