Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Replacing XML Tag name with another

by Ratazong (Prior)
on Sep 27, 2011 at 11:43 UTC ( #928070=note: print w/ replies, xml ) Need Help??


in reply to Replacing XML Tag name with another

So where do you encounter problems?

  • in step 1: opening the file?
  • in step 2: reading the file line-by-line?
  • in step 3: doing the replacements (using a regex-substitution s///g)?
  • in step 4: writing the result?

update: hint: For such simple replacements, treating the XML-file as a text-file is probably fine. However if you want more complex transformations, a using a CPAN-module (e.g. XML::Simple) is a much better choice.


Comment on Re: Replacing XML Tag name with another
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2015-07-04 22:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls