Rather than reinventing the wheel, use one of the many available CPAN modules that know how to parse and generate (read and write) XML. Look in the XML namespace on CPAN.
Start by writing a small program to locate the author and afiil nodes in a stripped-down version of your a.txt and print what it finds. If you run into difficulties, show us
and you will get lots of help from Perlmonks.
In reply to Re: Search and Replace for XML
by Narveson
in thread Search and Replace for XML
by srprabu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |