SAX VS XmlTextReader的 - SAX在C# [英] SAX vs XmlTextReader - SAX in C#

查看:259
本文介绍了SAX VS XmlTextReader的 - SAX在C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图读取大的XML文档,我想做这在块VS 的XmlDocument 的读取整个文件到内存的方式。我知道我可以使用的XmlTextReader 来做到这一点,但如果有人使用SAX的.NET我想知道?我知道Java开发人员通过它发誓,我不知道是否值得给它一个尝试,若然都在使用它的好处。我在找细节

I am attempting to read a large XML document and I wanted to do it in chunks vs XmlDocument's way of reading the entire file into memory. I know I can use XmlTextReader to do this but I was wondering if anyone has used SAX for .NET? I know Java developers swear by it and I was wondering if it is worth giving it a try and if so what are the benefits in using it. I am looking for specifics.

推荐答案

如果你在谈论的 SAX为.NET ,该项目似乎并没有得到保持。最后一个版本是2年多前。也许他们得到了完美的最后一个版本,但我不会赌。笔者卡尔Waclawek,似乎已经消失了网。

If you're talking about SAX for .NET, the project doesn't appear to be maintained. The last release was more than 2 years ago. Maybe they got it perfect on the last release, but I wouldn't bet on it. The author, Karl Waclawek, seems to have disappeared off the net.

对于Java的下SAX?没错,这是伟大的。不幸的是,SAX永远不会被开发为标准,因此所有的非Java端口已适应自己需要的Java API。虽然DOM是一个相当糟糕的API,它具有被设计为多语言和环境的优势,所以很容易使用Java,C#,JavaScript的,C等来实现。

As for SAX under Java? You bet, it's great. Unfortunately, SAX was never developed as a standard, so all of the non-Java ports have been adapting a Java API for their own needs. While DOM is a pretty lousy API, it has the advantage of having been designed for multiple languages and environments, so it's easy to implement in Java, C#, JavaScript, C, et al.

这篇关于SAX VS XmlTextReader的 - SAX在C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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