Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Transliteration inside an XML file

by grondilu (Friar)
on Jun 19, 2014 at 10:48 UTC ( [id://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?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1090438]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-19 02:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found