您是否知道有一种工具可以将类如何编组到 XML 的 XSD 定义转换为类图(UML?)?
我收到了一个 XSD 文件,它描述了如何将对象编组到 XML 中。 XSD 非常复杂,当我尝试编写一些代码来解析它(使用 SAX)时,我无法将其全部记在心里。我想要的是某种可以将此 XSD 定义转换为类图的工具。你知道吗?
如果它能在 Linux 下运行,那就加分了(但这当然不是必需的)。
I've been given an XSD file that describes how objects will be marshalled into XML. The XSD is complex enough that I can't keep it all in my head while trying to write some code to parse it (with SAX). What I'd like is some sort of tool that could turn this XSD definition into a class diagram. Do you know of any?
Bonus points if it'll run under Linux (but this certainly isn't a requirement).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Hypermodel 就是这样做的。它是一个 Eclipse 插件(即:在 Linux 中运行,但在 Java 中运行),它读取模式文件并生成 UML 模型。如果您没有完整的建模工具,它内置了一个简单的查看器。
或者,使用 JAXB 之类的绑定框架,并找到一个工具来从生成的类创建类图。
Hypermodel does that. It's an eclipse plugin (read: runs in Linux, albeit in Java) that reads a schema file and produces a UML model. It has a simple viewer built in if you don't have a full modelling tool.
Alternatively, use a binding framework like JAXB and find a tool to create a class diagram from the generated classes instead.
Microsoft 的 XML 架构定义工具 (Xsd.exe) 有助于将架构转换为 C# 类 -
http://msdn.microsoft.com/en-us/library/x6c1kb0s.aspx
我知道我知道,它是 C#...但是,至少它会帮助您更好地理解您的架构。
另外,我看到您提到了 Linux,因此这里是 Mono Xml 的链接 -
http://www.mono-project.com/XML。 mono-project.com/XML
The XML Schema Definition Tool (Xsd.exe) from Microsoft helps to transform schema into C# classes -
http://msdn.microsoft.com/en-us/library/x6c1kb0s.aspx
I know I know, its C#... however, at minimum it will help you understand your schema better.
Also, I see that you mentioned Linux so here is a link to the Mono Xml -
http://www.mono-project.com/XML