6

I've search google and here, but still can't find a solution for my need. I've download a few plugins and softwares, like UmlGraph, UMLet and Java2Uml, and StarUml and ArgoUml, but it seems I still can't find a way to generate a class diagram from a XML file.

I have a huge model that I must understand it's hierarchy, and I think a good way to reach this would be to dinamically generate a class diagram from the model XML file. Generate from the VO's would be awesome too.

I've read here that StarUml have a reverse engineering feature, but I can't find it inside the software. Anyone knows how to make it?

Lipe
  • 71
  • 1
  • 1
  • 7
  • I've just found it inside StarUml, but it needs the Java plugin to make the reverse engireering work, and it is located at Github, which is blocked here where I'm working. Must find another tool.. – Lipe Mar 27 '15 at 14:07
  • If you have a `XML` file with the `UML` model in [XML Metadata Interchange(XMI)](http://en.wikipedia.org/wiki/XML_Metadata_Interchange) format then use an [UML modeling tool](http://en.wikipedia.org/wiki/List_of_Unified_Modeling_Language_tools) to open it and study. There's no _reverse engineering_ involved. Reverse engineering would attempt to create the model for you from existing source code. It seems that you already have the model. So just open it (...?) – xmojmr Mar 27 '15 at 14:59
  • 1
    I see your point, and I agree. Maybe I've not explained well. The model IS defined, but it has no documentation. It don't have the XMI. I just have a sample XML file, populated with data, and I'd like to generete a graphic model, which I think would be the class diagram, from it. I've tried to import the XML into one of these softwares I've downloaded, the ArgoUml, but I've notice, just like you said, it was expecting a XMI file. Atempt to import the XML results in this:org.argouml.model.XmiException: XMI parsing error at line: 1: XMI version attribute is missing... – Lipe Mar 27 '15 at 16:11
  • Try a test version of Enterprise Architect. They support a variety of XMI formats. 30 day trial. And cheap compared to competitors. – qwerty_so Mar 27 '15 at 22:56

1 Answers1

2

REQ1) Free plugin

REQ2) I have a huge model that I must understand it's hierarchy

REQ3) I just have a sample XML file, populated with data, and I'd like to generate a graphic model from it

REQ4) graphic model, which I think would be the class diagram

REQ5) Generate from the VO's would be awesome

I have no idea what does REQ5 mean and I don't know what would actually satisfy the REQ1, but it does not matter much as recommending any tool is actually Stack Overflow off-topic #4

It looks like you need to divide the problem into

  1. infer XML Schema from provided XML data file, by reverse engineering (if you can't obtain the original XSD definition from the data provider). Some options are listed in Stack Overflow: Any tools to generate an XSD schema from an XML instance document?

  2. visualize a XML Schema. Serious XSD editors can visualize the schema somehow. Some options are listed in Stack Overflow: How to visualize an XML schema?

  3. convert XML Schema into UML class model and use an UML modeling tool to visualize it. Some options are listed in Stack Overflow: XSD to UML command line tool


The easiest path to solve the REQ2 (which seems to be the core) might be to contact the data provider, make him/her to give you the XSD schema and use your IDE's features to navigate, understand it by whatever means it provides


Paper & pencil looks indispensable as well


The answer may look patronizing and abstractly useless, but I'm really not aware of any cannon handling this job painlessly

Community
  • 1
  • 1
xmojmr
  • 8,073
  • 5
  • 31
  • 54