Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Transliteration inside an XML file

by grondilu (Friar)
on Jun 19, 2014 at 10:48 UTC ( #1090438=note: print w/replies, xml ) Need Help??

in reply to Transliteration inside an XML file

Well, if what you want is to do the transliteration only inside the TIER element, you can use flip/flop.

if (/\<TIER/ .. /\/TIER\>/) { $input =~ $your_substitution_regex; }

That's a quick and dirty solution but it's cheap so you may just be happy with it if you don't want to seriously parse the XML.

See the perlop man page for more info about this operator.

Replies are listed 'Best First'.
Re^2: Transliteration inside an XML file
by flowdy (Scribe) on Jun 19, 2014 at 11:06 UTC

    As described in OP, the tags to select seem to be qualified by certain attributes. Hence your regexes fall short here.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1090438]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2018-07-21 23:47 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (450 votes). Check out past polls.