6

I'm trying to programmatically extract information from an Enterprise Architect model (saved in an XMI file) - I need it to generate some reports, but I don't want to go so far as to create an EA add-in. Is there a C# XMI parser library anywhere?

I could of course generate XMI parsing code from its XML schema, but that would be my second option.

Igor Brejc
  • 18,714
  • 13
  • 76
  • 95

2 Answers2

3

Do you really need an XML? EA saves its information in a database (Standard Jet DB alias MS Access format as of EA 7.5 despite its eap file extension), it should be easy to query. Another way is to use Automation interface (in C# you will need to import Interop.EA) to gain access to everything EA stores and also to diagrams that are generated.

menjaraz
  • 7,551
  • 4
  • 41
  • 81
user160400
  • 71
  • 3
2

Ok, what I've discovered so far is that there are different versions of XMI. To quote Wikipedia:

Several versions of XMI have been created: 1.0, 1.1, 1.2, 2.0 and 2.1. The 2.x versions are radically different from the 1.x series.

I exported EA model both to 1.1 and 2.1 and the exports really do look different, starting from top XML elements. So I guess when talking about a MI parser, you first have to specify which XMI version you are interested in.

Igor Brejc
  • 18,714
  • 13
  • 76
  • 95
  • How did you finally resolve the C# parsing problem? I guess you settled down on XMI 2.1 but what was next? Did you use a documentation or schema for the "" part? – xmojmr Aug 08 '14 at 12:34
  • Huh, that was 5 years ago, I can't really remember, it wasn't a very important functionality on the project I was working on at the time. Sorry :( – Igor Brejc Aug 08 '14 at 17:20