更新时间:2023-11-07 12:55:28
这可能对您来说很有趣.
This might be of intrest to you.
http: //lxml.de/FAQ.html#why-doesn-t-the-pretty-print-option-reformat-my-xml-output
简而言之,供以后参考:
In short for future reference:
parser = etree.XMLParser(remove_blank_text=True)
pom = etree.parse("pom.xml",parser)