using lxml and iterparse() to parse a big (+- 1Gb) XML file
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have to parse a 1Gb XML file with a structure such as below and extract the text within the tags "Author" and "Content": MM/DD/YY Last Name, Name Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas dictum dictum vehicula. MM/DD/YY Last Name, Name Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas dictum dictum vehicula. [...] MM/DD/YY Last Name, Name Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas dictum dictum vehicula. So far I've tried two things: i) reading the whole file and going through