Basicly I download a few XML files and then append them with Element Tree. The problem is that the final file has these things:
<<?xml version="1.0" encoding="UTF-8" standalone="yes"?> - at the start of each new xml fil
...
</product_info> /><product_info> ...
where product info is the actual cosing tag and the /> is what is messing everything up.
I fixed the first part by removing the XML declaration in the original xml file with:
replace('<?xml version="1.0" encoding="UTF-8" standalone="yes"?><','')
#I remove a closing bracet at the end because I cannot remove the opening bracet as it is not in the original file
I suspect the problem is that for some reason before each XML files is apeneded it is enclosed in some tag?
When I check the 'ET.SubElement(root,response_xml)' this is what prints:
<Element 'product_info article_id="0006303562403"...'
Could the tag be the problem?