简体   繁体   中英

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.

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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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