import codecs
import xml.dom.minidom as minidom
xml = minidom.parseString('<ru>\u0422\u0435\u0441\u0442</ru>'.encode('utf-8'))
with codecs.open('out.xml', 'w', 'utf-8') as out:
    xml.writexml(out)
Writing XML to file corrupts files in python