如何阅读XMI? [英] How to read XMI?

查看:251
本文介绍了如何阅读XMI?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要阅读序列化为XMI的UML图。是否有任何库可以让我方便地阅读UML XMI - 方便的是我有一些方法来迭代模型中的类/包/方法/属性等等。

I need to read UML diagrams that are serialized into XMI. Is there any library that would allow me to conveniently read UML XMI - by conveniently I mean having some methods to iterate over classes/packages/methods/attributest etc. in model.

我尝试了EMF,但是我找不到任何可以显示如何导入包含UML的XMI的教程。我还找到了 NSUML / NSMDF ,但文档链接已损坏。

I tried EMF, but I am unable to find any tutorial that would show how to import XMI containing UML. I have also found NSUML/NSMDF but the link to documentation is broken.

推荐答案

我不认为你想要什么。导入我知道的XMI的所有工具(包括我的XMI转换服务: http://modeling-languages.com/content/xmi2-tool-exchanging-uml-models-among-case-tools )通过解析整个XMI文件并创建相应的UML模型来工作主记忆。然后,您可以通过查询模型来访问UML元素。

I don't think what you want exists. All tools importing XMI that I know (including my XMI transformation service: http://modeling-languages.com/content/xmi2-tool-exchanging-uml-models-among-case-tools) work by parsing the whole XMI file and creating the corresponding UML model in main memory. Then you can access to the UML elements by querying the model.

要迭代XMI模型,您可以轻松使用XML库来选择XMI文件的各个部分。感兴趣的是。

To iterate on the XMI model you can easily use XML libraries to select the pieces of the XMI file you are interested in.

这篇关于如何阅读XMI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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