Is there ANY cross-platform way of validating xml against an xsd in javascript?(是否有任何跨平台的方式来针对 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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:是否有任何跨平台的方式来针对 javascript 中的


基础教程推荐
- 直接将值设置为滑块 2022-01-01
- 自定义 XMLHttpRequest.prototype.open 2022-01-01
- 如何使用TypeScrip将固定承诺数组中的项设置为可选 2022-01-01
- 用于 Twitter 小部件宽度的 HTML/CSS 2022-01-01
- Chart.js 在线性图表上拖动点 2022-01-01
- html表格如何通过更改悬停边框来突出显示列? 2022-01-01
- 如何使用JIT在顺风css中使用布局变体? 2022-01-01
- Electron 将 Node.js 和 Chromium 上下文结合起来意味着 2022-01-01
- Vue 3 – <过渡>渲染不能动画的非元素根节点 2022-01-01
- 我可以在浏览器中与Babel一起使用ES模块,而不捆绑我的代码吗? 2022-01-01