简体   繁体   English

从Java类或XML创建XSD?

[英]Create XSD from Java Class or from XML?

将来,从Java Class或Xml获取XSD文件以验证XML文件的最佳方法是什么?

Neither. 都不是。 It's best to create an XSD by careful deliberation by hand. 最好通过手工仔细考虑来创建XSD。

Automatically creating an XSD from an object or an XML document instance can be useful to jumpstart the process but cannot capture all constraints likely to be needed. 从对象或XML文档实例自动创建XSD对于快速启动流程非常有用,但无法捕获可能需要的所有约束。 Consider that in general, a single member of a category rarely possesses sufficient characteristics to support basing the definition of the entire category on it alone. 一般来说,一个类别中的单个成员很少拥有足够的特征来支持单独使用整个类别的定义。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM