I'm using XML::Simple to edit an XML file. After which the updated data is sent to a new XML file. But this procedure produces <opt></opt>
tag to be added and the original parent tag is lost. I want to replace <opt>
with the original tag name. How do I do that?
You're stretching the limits of XML::Simple. When you get to the point where you don't like exactly what it does, it's time for something else. What that something else is depends on your problem, but I like XML::Twig.