[SOLVED] Python 2.7 lxml: How to replace a tag with a comment

Issue I have the fallowing XML: <?xml version=’1.0′ encoding=’UTF-8′?> <A xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://obe.nce.amadeus.net/bms/metadata/1-0/"> <B name="NAME" version="VERSION"> <AA>SOME NAME</AA> <CC>SOME OTHER NAME</CC> </B> <C> <SOME1> <TAG_3 name="NAME_1" path="path_1"/> <TAG_3 name="NAME_2" path="path_2"/> <TAG_3 name="NAME_3" path="path_3"/> </SOME1> <SOME2> <TAG_3 name="NAME_4" path="path_1"/> <TAG_3 name="NAME_5" path="path_2"/>

Continue reading