0

Hello stack overflow community!

I am working on a method to create Java unit/integration tests based on UML Sequence Diagrams.

So, my first step is using the .XML file that is generated by Astah to get the information about the classes/methods of the diagram.

On my online search, I could not find a library to help me on fetching/parsing these informations from the XML file.

Is there anything that could help me on reading this file instead of doing it 100% manually?

Thanks!

  • 1
    Is it XML or XMI? – Gholamali Irani Jan 16 '18 at 19:50
  • @Gholamali-Irani it's XML!! – leonardokbruksch Jan 17 '18 at 09:50
  • There are many XML parser in Java, check these questions and answers: [q1](https://stackoverflow.com/questions/373833/best-xml-parser-for-java) , [q2](https://stackoverflow.com/questions/5059224/which-is-the-best-library-for-xml-parsing-in-java) , [q3](https://stackoverflow.com/questions/3855324/where-i-can-find-a-detailed-comparison-of-java-xml-frameworks) , [q4](https://stackoverflow.com/questions/2523381/best-java-xml-parser-to-manipulate-edit-an-existing-xml-document) and [q5](https://stackoverflow.com/questions/831865/what-java-xml-library-do-you-recommend-to-replace-dom4j) – Gholamali Irani Jan 17 '18 at 10:46
  • I mentioned a detail solution to read UML XMI here [Sequence Diagram Model Reader](https://stackoverflow.com/questions/40331831/read-sequence-diagram-xmi-by-emf/55195428#55195428) – Alpha Mar 16 '19 at 10:01

1 Answers1

0

I just try Astah 7.2.0 and it seems that the XML export follow XMI 1.1 format for UML 1.4.

<XMI xmi.version="1.1" xmlns:JUDE="http://objectclub.esm.co.jp/Jude/namespace/" xmlns:UML="org.omg.xmi.namespace.UML">
<XMI.metamodel xmi.name="UML" xmi.version="1.4"/>

If it is also your case and if Atash really implements this. You have now to find a library able to parse this...

It also seems that Atash has a plugin for a XMI 2.4.1/ UML 2.4.1 export. If you have access to it, it would be more easy to get a library able to parse it.

Cheers

Red Beard
  • 3,436
  • 1
  • 14
  • 17