I have an XML file that looks like this:
<a>
<b>
<c>World</c>
</b>
</a>
and should look like this:
<a>
<b>
<c>World</c>
<c>World</c>
</b>
</a>
My code is the following:
import xml.etree.ElementTree as ET
file=open("6x6.xml", "r")
site=file.ET.Element("b")
for c in file:
site.append(c)
file.write("out.xml")
file.close()