什么是Delphi最快的XML解析器? [英] What is the fastest XML Parser available for Delphi?

查看:495
本文介绍了什么是Delphi最快的XML解析器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们目前使用MSXML2解析相当大的XML字符串



我刚刚尝试使用MSXML6来提高速度,并且没有任何东西!



我们目前创建了大量的DOM文档,我想可能会有一些开销,不断与MSXML2 / 6 dll



有没有人知道Delphi的更好/更快的XML组件?



如果有人可以提出替代方案,而且速度更快,我们将寻求集成,但是将是很多工作,所以希望结构与MSXML使用的结构不会太大。



我们正在使用Delphi 2010



Paul

解决方案

最近我有一个类似的问题,使用MSXML DOM解析器证明太慢了给定的任务。我不得不解析相当大的文档> 1MB,并且DOM解析器的内存消耗是禁止的。
我的解决方案是根本不使用DOM解析器,而是使用事件驱动的MSXML SAX解析器。这被证明是快得多了。不幸的是,编程模型是完全不同的,但依赖于任务,这可能是值得的。
Craig Murphy发表了一篇关于如何在delphi中使用MSXML SAX解析器的优秀文章:
SAX,Delphi和Ex Em El


We have reasonably large XML strings which we currently parse using MSXML2

I have just tried using MSXML6 hoping for a speed improvement and have got nothing!

We currently create a lot of DOM Documents and I guess there may be some overhead in constantly interacting with the MSXML2/6 dll

Does anyone know of a better/faster XML component for Delphi?

If anyone can suggest an alternative, and it is faster, we would look to integrate it, but that would be a lot of work, so hopefully the structure would not be too different to that used by MSXML

We are using Delphi 2010

Paul

解决方案

Recently I had a similar issue where using the MSXML DOM parser proved to be too slow for the given task. I had to parse rather large documents > 1MB and the memory consumption of the DOM parser was prohibitive. My solution was to not use a DOM parser at all, but to go with the event driven MSXML SAX parser. This proved to be much, much faster. Unfortunately the programming model is totally different, but dependent on the task, it might be worth it. Craig Murphy has published an excellent article on how to use the MSXML SAX parser in delphi: SAX, Delphi and Ex Em El

这篇关于什么是Delphi最快的XML解析器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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