是否有任何跨平台的方式来针对 javascript 中的 xsd 验证 xml? [英] Is there ANY cross-platform way of validating xml against an xsd in javascript?

查看:23
本文介绍了是否有任何跨平台的方式来针对 javascript 中的 xsd 验证 xml?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我所知,这样做的唯一方法是使用 Microsoft DOM 对象,但据我所知,这并不是普遍可用的,例如,如果您在 Linux 上使用 Firefox 浏览.

As far as I can tell, the only way of doing it is to use the Microsoft DOM object, but as far as I'm aware this isn't universally available, if you're browsing with Firefox on Linux for example.

出于安全和最小化网络流量的原因,我无法将 xml 传递给外部工具进行验证(就像我希望的那样).无论使用何种浏览器/平台,是否有任何方法可以让 javascript 执行此操作?

For reasons of security and minimizing network traffic I can't pass the xml to an external tool to validate (much as I wish I could). Is there any way of getting javascript to do this regardless of the browser/platform being used?

推荐答案

好的,经过大量研究,似乎对这个问题的简单答案是不",除非我用 javascript 编写自己的验证器.

Ok, after a fair amount of research, it seems the simple answer to this one is 'no', unless I write my own validator in javascript.

这篇关于是否有任何跨平台的方式来针对 javascript 中的 xsd 验证 xml?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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