Search code examples
javaxmlparsingumldiagram

Getting Classes/Methods information from UML Sequence Diagram XML


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!


Solution

  • 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