in reply to Re^4: Trees in XML
in thread Trees in XML
Is the output you want the same XML document you are reading, with the first name replaced by the result of a query? In that case Tree is probably not the style you want to use. Stream or Subs would be easier to use, at least because they take care of copying the data you don't want to process as is. It still won't be as convenient as a higher-level module though, you will still have to write a bit of code yourself. At least you will have to output back the tags you are processing, and escape the text you want to insert.
BTW, I have always tried to keep XML::Twig installation as simple as possible, so if you're using perl 5.8.*, you should be able to drop the Twig.pm file from the distribution either in you Perl's library XML directory, or just in a sub-directory named XML of the current directory.
|
|---|