适用于Python的高级快速XML包? [英] high level, fast XML package for Python?

查看:64
本文介绍了适用于Python的高级快速XML包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网上搜索,但是找不到使用Python和XML工作的标准软件包 - 每个人似乎都建议不同的


/>

是否有适用于Python的标准xml包?最好是高级,快速的b $ b和b可以解析文件内存,而不是内存,因为我必须处理可能的MB数据。
br />
谢谢。

I searched online, but couldn''t really find a standard package for
working with Python and XML -- everybody seems to suggest different
ones.

Is there a standard xml package for Python? Preferably high-level, fast
and that can parse in-file, not in-memory since I have to deal with
potentially MBs of data.

Thanks.

推荐答案

Gleb Rybkin写道:
Gleb Rybkin wrote:

我在网上搜索过,但是无法找到使用Python和XML的

的标准包 - 每个人似乎都建议使用不同的



是否有适用于Python的标准xml包?最好是高级,快速的b $ b和b可以解析文件内,而不是内存,因为我必须处理可能的MB数据。
I searched online, but couldn''t really find a standard package for
working with Python and XML -- everybody seems to suggest different
ones.

Is there a standard xml package for Python? Preferably high-level, fast
and that can parse in-file, not in-memory since I have to deal with
potentially MBs of data.



cElementTree和lxml(与前者API兼容)。 cElementTree

有一个增量解析器,允许处理大于内存的文件

处理。


Diez

cElementTree and lxml (which is API-compatible to the former). cElementTree
has an incremental parser, which allows for lager-than-memory-files to be
processed.

Diez


Diez B. Roggisch写道:
Diez B. Roggisch wrote:

Gleb Rybkin写道:
Gleb Rybkin wrote:

>我在线搜索,但无法找到使用Python和XML的标准软件包 - 每个人似乎都提出了不同的建议。
<是否有适用于Python的标准xml包?最好是高级,快速的,并且可以解析文件内,而不是内存,因为我必须处理潜在的MB数据。
>I searched online, but couldn''t really find a standard package for
working with Python and XML -- everybody seems to suggest different
ones.

Is there a standard xml package for Python? Preferably high-level, fast
and that can parse in-file, not in-memory since I have to deal with
potentially MBs of data.



cElementTree和lxml(与前者API兼容)。 cElementTree

有一个增量解析器,它允许处理大于内存的文件。


cElementTree and lxml (which is API-compatible to the former). cElementTree
has an incremental parser, which allows for lager-than-memory-files to be
processed.



在Python 2.5中,cElementTree和ElementTree将作为xml.etree.cElementTree和xml.etree.ElementTree在

标准库中提供。

所以现在学习它们是一个好主意。


STeVe

In Python 2.5, cElementTree and ElementTree will be available in the
standard library as xml.etree.cElementTree and xml.etree.ElementTree.
So learning them now is a great idea.

STeVe


好的,谢谢!


Steven Bethard写道:
Okay, thanks!

Steven Bethard wrote:

Diez B. Roggisch写道:
Diez B. Roggisch wrote:

Gleb Rybkin写道:
Gleb Rybkin wrote:

我在网上搜索过,但是找不到一个标准包用

使用Python和XML - 每个人似乎都建议不同的




是否有适用于Python的标准xml包?最好是高级,快速的b $ b和b可以解析文件内,而不是内存,因为我必须处理可能的MB数据。
I searched online, but couldn''t really find a standard package for
working with Python and XML -- everybody seems to suggest different
ones.

Is there a standard xml package for Python? Preferably high-level, fast
and that can parse in-file, not in-memory since I have to deal with
potentially MBs of data.



cElementTree和lxml(与前者API兼容)。 cElementTree

有一个增量解析器,它允许处理大于内存的文件。

cElementTree and lxml (which is API-compatible to the former). cElementTree
has an incremental parser, which allows for lager-than-memory-files to be
processed.



在Python 2.5中,cElementTree和ElementTree将作为xml.etree.cElementTree和xml.etree.ElementTree在

标准库中提供。

所以现在学习它们是一个好主意。


STeVe


In Python 2.5, cElementTree and ElementTree will be available in the
standard library as xml.etree.cElementTree and xml.etree.ElementTree.
So learning them now is a great idea.

STeVe


这篇关于适用于Python的高级快速XML包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆