Spectre_k9
Spectre_k9

Reputation: 61

How to import any UML/XMI files to StarUML?

I am trying to import a UML Diagram (of a C++ project) I designed in a program called Visual Paradigm.

This program allows me to save the UML diagram in various formats

Image)

and when I choose the XMI format (supported by StarUML through an extension ) it allows me to pick the XMI version to save the file

Image

The problem comes when I try to import the file in StarUml: when I try to load an XMI file (I tried every version) that cames from V.P. it says "Failed to load the file";

Image

On the other hand, if I save the diagram into UML2 format and then I try to open it, StarUML just does nothing.

Do You have any suggestions to work this problem out?

Here is a zip archive with another simpler project containing source code and XMI files (different versions) generated by Visual Paradigm: Project.rar

Upvotes: 6

Views: 6838

Answers (1)

LeonFibuck
LeonFibuck

Reputation: 356

In StarUML Github Issues there is something very similar to you issue.

I had the same problem and the workaround proposed worked for me, search for file "xmi-reader.js", then change in function "loadFromFile" the line:

var XMINode = dom.getElementsByTagName('XMI')[0]

to

var XMINode = dom.getElementsByTagName('xmi:XMI')[0]

Adding the name space "xmi:" to the name of the element makes it work.

Depending on you version of StarUML the file name could be xmi21-reader.js .

Upvotes: 3

Related Questions