I am a newbee to perl. I have written some simple programs but nothing very complex. I have a requirement where I have to write a complex program in Perl.
I have a XML file which looks like this :
I want to remove the element "dummy_record" from the file and again write the output as xml. So finally the file should look like this:<?xml version="1.0"> <escinfo> <dbf> <progress> <record> <title>11111</title> <id>abcd</id> </record> <record> <title>22222</title> <id>efgh</id> </record> <dummy_record> <dummy> <title>22222</title> <id>efgh</id> </dummy> </dummy_record> <dummy_record/> </progress> </dbf> </escinfo>
How can I do this using perl ?<?xml version="1.0"> <escinfo> <dbf> <progress> <record> <title>11111</title> <id>abcd</id> </record> <record> <title>22222</title> <id>efgh</id> </record> </progress> </dbf> </escinfo>
Thanks in advance.
Janitored by Arunbear - added code tags, as per Monastery guidelines
In reply to Parsing XML file and removing the element by sananpah
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |