Author Topic: Export UML diagram to XML  (Read 5096 times)

cpyf8rfAaap277

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Export UML diagram to XML
« on: March 09, 2015, 07:08:54 pm »
I have created a UML class diagram with few classes and added attributes with default values. In the next step I created objects from those classes and put them on a object diagram.
Now I want to export the information in an xml file, which will be the input for a project I’m actually working on.

The file has a specific form which looks like this for the class "component" with the attributes "ID" and "Memory":

<components>
      <component>
            <property name="ID" type="integer">0</property>
            <property name="Mem" type="integer">512</property>
      </component>
      <component>
            <property name="ID" type="integer">1</property>
            <property name="Mem" type="integer">128</property>
      </component>
</components>


“Export package to XMI” (Project ->Model Import/Export) exports the whole project with a lot of information which I do not need. Is it possible to select the elements and attributes which shall be exported? Or is there a smart plugin which could help me?

Thanks in advance!

Hans

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: Export UML diagram to XML
« Reply #1 on: March 10, 2015, 08:44:17 am »
I think you'll need to write something yourself to get output like that.

heba

  • EA User
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Re: Export UML diagram to XML
« Reply #2 on: March 10, 2015, 10:39:55 am »
XSLT can be your friend here.  I export XMI and let a XSL translator process the XMI outside EA for something similar.  Works quite well but is usually less compatible between the major XMI versions :(


-heiko