I have a malformed xml file which is generated with incorrect closing tags as follows.
<Root>
.
.
<Question id='1' type='text'>London</Question id='1' type='text'>
<Question id='2' type='radio'>4</Question id='2' type='radio'>
<Question id='3' type='check'>6</Question id='3' type='check'>
.
.
</Root>
I need to refine this XML file with propper closing tags as follows.
<Question id='1' type='text'>London</Question>
In summary close tags like,
<Question id='some id' type='some type'> should be replaced with </Question>
There are hundreds of tags in the file. How can I use string operations with RegEx to process that file in order to create a well-formed XML file.
Thanks,
Chatur