Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Replacing XML Tag name with another

by dHarry (Abbot)
on Sep 27, 2011 at 12:20 UTC ( #928075=note: print w/replies, xml ) Need Help??


in reply to Replacing XML Tag name with another

I advice using a proper XML parser! They come in various flavors. XML::Simple jumps to mind. Or maybe even better XML::Twig as it probably doesn't end with replacing tags and you need to do other things with your xml file.

I advice against parsing the file line-by-line and apply some regexp. This type of solution easily breaks. Using a decent parser gives you a more "future proof" solution.

  • Comment on Re: Replacing XML Tag name with another

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://928075]
help
Chatterbox?
[hippo]: Congrats. I expect the resulting code to be rock solid. :)
[stevieb]: Thanks hippo, as do I, as if it's not, hardware peripherals or sensors could be destroyed (code has to be reliable when dealing with input/output voltages)

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (15)
As of 2017-01-20 16:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (176 votes). Check out past polls.