问题描述
似乎所有常用的 XMLValidation 类(例如 XmlValidatingReader)在 Silverlight 中都不存在(或仅出于接口兼容性"而存在).
Is seems like all the commonly-used classes for XMLValidation, for example XmlValidatingReader, are absent (or present "for interface compatibility only") in Silverlight.
有什么方法可以根据 Silverlight 中的 XSD 架构验证 XML?
Is there any way to validate XML against an XSD schema in Silverlight?
推荐答案
抱歉,我仍然认为这在 SL3 中仍然不可能:
Sorry, but I still don't think this is still possible in SL3:
http://forums.silverlight.net/forums/p/53434/138536.aspx
如果您真的,真的需要在 SL 中重用 .NET 程序集,您可以这样做,但这意味着将其与您的应用程序一起打包.我不建议这样做,但可以在此处找到有关如何执行此操作的详细信息:http://www.netfxharmonics.com/2008/12/Reusing-NET-Assemblies-in-Silverlight
If you really, really need to reuse a .NET assembly in SL you can do so, but it means packaging that up with your application. I don't recommend this, but details on how to do it can be found here: http://www.netfxharmonics.com/2008/12/Reusing-NET-Assemblies-in-Silverlight
希望这会有所帮助.
这篇关于是否可以在 Silverlight 3 中针对 XSD 验证 XML?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!