2006年02月15日 星期三 20:41
不要用dom,用sax逐条处理记录,不需要全部留在内存里。 -----原始邮件----- 发件人: python-chinese-bounces at lists.python.cn [mailto:python-chinese-bounces at lists.python.cn]代表 徐祥军 发送时间: 2006年2月15日 18:02 收件人: python-chinese at lists.python.cn 主题: Re: [python-chinese] 有没有比cElementTree更好支持xml解析的lib, 并且对xpath也能提供很好支持的。 对,我就是采用cElementTree来做的,ElementTree跑不动的。 我是想找个更好一点的来出来xml文件。 On 2/15/06, 清风 <paradise.qingfeng at gmail.com > wrote: ElementTree不是有一个CElementTree吗?那个性能应该不错吧 On 2/15/06, Bruce Wang < number5 at gmail.com> wrote: > 用 lxml试试看, 是基于 libxml2的, API类似ElementTree > 或者直接用 libxml2 的python binding > > 另外, 既然对性能要求那么高, 为什么非要用python呢? > > > On 2/15/06, 徐祥军 < martin.xus at gmail.com> wrote: > > > > 能不能具体的讲一讲。 > > 先谢了。 > > > > > > > > On 2/15/06, Zoom Quiet < zoom.quiet at gmail.com > wrote: > > > On 2/15/06, 徐祥军 <martin.xus at gmail.com> wrote: > > > > 第一:对xpath能很好支持的,例如: > > > > 支持任意的xpath > > > > /Attribute_Groups/Attribute > > > > 支持带有attribute的xpath > > > > //ERwin4/Model/Entity_Groups/Entity[@id=id] > > > > > > > > > > > > > 第二:运行速度越快越好,我用cElementTree解析要花十几分钟的时间,用ElementTree运行不了。 > > > 对于大型的XML处理,建议不用Pytohn 的了,而且,最好不要使用DOM 类型的, > > > 事务类型的更加高效些………… > > > > > > > > > > > 大家再帮我推荐一个,谢谢 > > > > > > > > _______________________________________________ > > > > python-chinese > > > > Post: send python-chinese at lists.python.cn > > > > Subscribe: send subscribe to > > > > python-chinese-request at lists.python.cn > > > > Unsubscribe: send unsubscribe to > > > > python-chinese-request at lists.python.cn > > > > Detail Info: > > > > http://python.cn/mailman/listinfo/python-chinese > > > > > > > > > > > > > > > > > -- > > > """Time is unimportant, only life important! > > > blogging : http://blog.zoomquiet.org/pyblosxom/ > > > wiki enter: > http://wiki.woodpecker.org.cn/moin/ZoomQuiet > > > in douban: http://www.douban.com/people/zoomq/ > > > """ > > > > > > _______________________________________________ > > > python-chinese > > > Post: send python-chinese at lists.python.cn > > > Subscribe: send subscribe to > python-chinese-request at lists.python.cn > > > Unsubscribe: send unsubscribe to > python-chinese-request at lists.python.cn > > > Detail Info: > http://python.cn/mailman/listinfo/python-chinese > > > > > > > > > > > > _______________________________________________ > > python-chinese > > Post: send python-chinese at lists.python.cn > > Subscribe: send subscribe to > python-chinese-request at lists.python.cn > > Unsubscribe: send unsubscribe to > python-chinese-request at lists.python.cn > > Detail Info: > http://python.cn/mailman/listinfo/python-chinese > > > > > > > > -- > simple is good > http://datastrategy.org/number5 > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to > python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to > python-chinese-request at lists.python.cn > Detail Info: > http://python.cn/mailman/listinfo/python-chinese > > -- Blog:http://qingfeng.ushared.com/blog/ _______________________________________________ python-chinese Post: send python-chinese at lists.python.cn Subscribe: send subscribe to python-chinese-request at lists.python.cn Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn Detail Info: http://python.cn/mailman/listinfo/python-chinese
Zeuux © 2025
京ICP备05028076号