When dealing with XML file, an XML file contains Chinese characters, use the text=re. The sub (u "[\ x00 - \ x08 \ x0b - \ x0c \ x0e - \ x1f] +", u ", "text) method to replace Chinese characters,
For XML. Etree. ElementTree ET. Fromstring () method, python2 still cannot be resolved, python3 can parse, did not check the related documents, who is clear, how to return a responsibility?
For XML, dom minidom module is still so!