I have a XML file that previously I commented some elements, and now I want to uncomment them..

I have this structure

```
<parent parId="22" attr="Alpha">
 <!--<reg regId="1">
  <cont>There is some content</cont><cont2 attr1="val">Another content</cont2>
 </reg>
--></parent>
<parent parId="23" attr="Alpha">
 <reg regId="1">
  <cont>There is more content</cont><cont2 attr1="noval">Morecont</cont2>
 </reg>
</parent>
<parent parId="24" attr="Alpha">
 <!--<reg regId="1">
  <cont>There is some content</cont><cont2 attr1="val">Another content</cont2>
 </reg>
--></parent>

```

I would like to uncomment all the comments of the file. That consequentially, also are the commented element and I would to uncomment them.

I am able to find the elements that are comment using xpath. Here is my snippet of code.

```
def unhide_element():
    path = r'path_to_file\file.xml'
    xml_parser = et.parse(path)
    comments = root.xpath('//comment')
    for c in comments:
       print('Comment: ', c)
       parent_comment = c.getparent()
       parent_comment.replace(c,'')
       tree = et.ElementTree(root)
       tree.write(new_file)

```

However, the replace is not working as it expects another element.

How can I fix this?