in reply to Transliteration inside an XML file

Here's how you can process the XML with XML::LibXML:
#!/usr/bin/perl use warnings; use strict; use XML::LibXML; my $xml = 'XML::LibXML'->load_xml( location => '1.xml' ); for my $element ($xml->findnodes('/ANNOTATION_DOCUMENT/TIER' . '[@LINGUISTIC_TYPE_REF="orthT"]/ANN +OTATION/' . 'REF_ANNOTATION/ANNOTATION_VALUE/te +xt()') ) { # Replace by your logic, or better, see what AnomalousMonk wrote. (my $translit = $element) =~ s/m/M/g; $element->setData($translit); } print $xml;
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ