MSXML2 和 .net - 旧代码
我们有一个使用 MSXML2 和 vb6 的遗留代码,可以正常工作。最近,我们将项目转换为 VB.NET,当 xml 变大时,我们遇到了 msxml 的问题 - 基本上它挂起了。 在谷歌上搜索这个问题后,我们发现这篇文章说.NET应用程序不支持使用MSXML http://support.microsoft.com/kb/815112
我想知道是否有人知道第三个party 组件可以模仿 msxml 的功能,但仍然可以与 .NET 一起使用。另一种选择是重写代码的那些部分(使用 system.xml 或 linq),这是非常痛苦的,因为我们的应用程序中广泛使用了 MSXML。
谢谢, 皮尼。
We have a legacy code that uses MSXML2 with vb6 that works fine. Lately we converted the project to VB.NET and we are experiencing issues with the msxml when the xml getting big - basically it hung.
After googling the issue we found this article that says The use of MSXML is not supported in .NET applications
http://support.microsoft.com/kb/815112
I wonder if anyone know of a third party component that can imitate what msxml does but still can work with .NET . The other option is to rewrite those parts of code (using system.xml or linq) are very painful because the extensive use of MSXML in our application.
Thanks,
Pini.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不幸的是没有,我从来没有听说过。 Microsoft 确实有另一个名为 XmlLite 有时听起来它适用于托管代码,但有时则不然。我从未尝试过,但它可能至少值得研究。否则,您唯一的选择就是不升级到 .Net 或迁移到托管 XML。 MS 确实有一篇文章可能对您有帮助,如何:使用 Visual C# .NET 在 System.xml 中实现常见 MSXML 任务。
但是,如果您确实决定在托管中重写,因为您使用的是 VB.Net,我强烈建议您查看 XML 文字。使用 XML 时非常简单。
Unfortunately no, not that I've ever heard of. Microsoft does have another utility out there called XmlLite that sometimes sounds like it works with managed code but sometimes not. I've never tried it but its probably worth at least investigating. Otherwise your only options are to not upgrade to .Net or to migrate to managed XML. MS does have an article that might help you, HOW TO: Implement Common MSXML Tasks in System.xml By Using Visual C# .NET.
But if you do decide to re-write in managed, since you're using VB.Net I'd highly recommend looking into XML Literals. XML is insanely easy when using them.
我没有丰富的从 MSXML 更新到 System.XML 的经验,但到目前为止我发现两者非常相似。如果我的代码使用的 MSXML 占用空间恰好相对较小,那可能是幸运的。
就目前而言,Mobilize.NET发布了一个指南,映射了两者之间的一些常见类(不确定它是否 100% 全面),我发现它是准确的:
如果你很幸运,你可以用旧的替换新的并运行它。
I don't have extensive experience updating from MSXML to System.XML, but so far I've found the two to be remarkably similar. That might be luck, if the footprint of MSXML my code was using just happened to be relatively small.
As far as it goes, Mobilize.NET published a guide mapping some common classes (not sure if it is 100% comprehensive) between the two, which I have found to be accurate:
If you're very lucky you can just substitute old for new and run it.