#!/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;
In reply to Re: Transliteration inside an XML file
by choroba
in thread Transliteration inside an XML file
by nikop
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |