Python xml ElementTree 可以解析非常大的 xml 文件吗? [英] Can Python xml ElementTree parse a very large xml file?
本文介绍了Python xml ElementTree 可以解析非常大的 xml 文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试解析一个大文件(> 2GB)的结构化标记数据,但内存不够.这是针对这种情况的 XML 解析类的最佳方式.请提供更多详细信息.
I'm trying to parse a large file (> 2GB) of structured markup data and the memory is not enough for this.Which is the optimal way of XML parsing class for this condition.More details please.
推荐答案
查看 iterparse()
函数.here一>.
这篇关于Python xml ElementTree 可以解析非常大的 xml 文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文