验证 XSD 架构? [英] Validate an XSD Schema?

查看:28
本文介绍了验证 XSD 架构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个 XML 模式(一个 XSD)来描述我们的合作伙伴应该向我们发送数据的格式.

I'm writing an XML schema (an XSD) to describe the format our partners should send us data in.

而且我很难找到可以验证我编写的 XSD 架构文件的工具.

And I'm having a hard time finding a tool that can validate the XSD schema file that I have written.

目前我发现的最好方法是首先编写一个示例输入 XML 文件,然后尝试使用 XSD 验证那个.但这并不像是最佳实践操作.

The best way I have found so far is to first write an example input XML file and then try to validate that with the XSD. But that doesn't feel like a best practice maneuver.

那么,我应该如何验证 XML 模式?

So, how should I validate an XML schema?

推荐答案

如果这是一个短期的事情,你可以使用像 Stylus Studio.

If this is a short-term thing, you could use an evaluation copy of a tool like Stylus Studio.

如果是长期维护,您可能需要考虑购买像 Stylus 这样的 XML 模式编辑器,或者 OxygenAltova.

If it's long-term maintenance, you might want to consider purchasing an XML schema editor like Stylus, or Oxygen or Altova.

您没有指定源语言,但是用 Java 或 .Net 编写模式验证器只需几行代码.

You didn't specify the source language, but it's only a few lines of code to write a schema validator in Java or .Net.

这篇关于验证 XSD 架构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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