简体   繁体   English

如何将ecore(EMF)转换为xsd

[英]How to convert ecore (EMF) to xsd

将.ecore文件转换为.xsd文件的最佳方法是什么?

You need to have the feature XSD Ecore Converter installed (it's part of the EMF project). 您需要安装XSD Ecore Converter功能(它是EMF项目的一部分)。

Then you can open the context menu on your ecore's generator model (extension .genmodel ) and select Export Model . 然后,您可以在ecore的生成器模型(扩展名.genmodel )上打开上下文菜单,然后选择Export Model It should offer you now to export the ecore to XML schema. 现在它应该为您提供将ecore导出到XML模式的功能。

In Eclipse, when only EMF SDK is installed, you may not be able to see the model exporter for "XML Schema". 在Eclipse中,仅安装EMF SDK时,您可能无法看到“XML Schema”的模型导出器。 (On my side, only "UML model" is visible). (就我而言,只有“UML模型”可见)。

Use an update site with EMF repository . 使用具有EMF存储库的更新站点。 Install the XSD features then the exporter would appear. 安装XSD功能然后会出现导出器。

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

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