Use lxml instead of minidom.