Gossamer Forum
Home : General : Perl Programming :

perl program to remove tags from XML file

Quote Reply
perl program to remove tags from XML file

I would like to write a Perl program that, given a correct or almost correct XML file, produces a properly indented diagram consisting only of tags, without content and without attributes. The XML file may be missing one or more closing tags. The program adds such missing tags.

For example, if we see </cd> but expect </track>, we will add </track>.

Can anyone tell me the best way to approach this problem? This is my first program in PERL, your help is greatly appreciated

Thanks!