2006年02月15日 星期三 16:45
第一:对xpath能很好支持的,例如: 支持任意的xpath /Attribute_Groups/Attribute 支持带有attribute的xpath //ERwin4/Model/Entity_Groups/Entity[@id=id] 第二:运行速度越快越好,我用cElementTree解析要花十几分钟的时间,用ElementTree运行不了。 大家再帮我推荐一个,谢谢 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060215/63347a38/attachment.htm
2006年02月15日 星期三 16:48
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/ """
2006年02月15日 星期三 16:53
能不能具体的讲一讲。 先谢了。 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060215/2dbfee1c/attachment.html
2006年02月15日 星期三 17:45
用 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060215/493feb67/attachment-0001.html
2006年02月15日 星期三 17:48
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/
2006年02月15日 星期三 18:00
我用java解析花了近半个小时才解析完一小部分文件,慢的不可想象。 并不是我不采用更好的方法,而是除了java,我只想到了python来做,我没处理过这么大的xml文件。 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060215/74be25f1/attachment.htm
2006年02月15日 星期三 18:01
对,我就是采用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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060215/c8275cc3/attachment-0001.html
Zeuux © 2025
京ICP备05028076号