XMI Format
The XMI format supports importing UML models from XMI 2.x files, including Enterprise Architect variants, enabling integration with UML modelling tools.
Overview
The XMI format (identifier: xmi) imports UML 2.x models serialised in XML Metadata Interchange (XMI) format. It supports:
- UML class diagrams and packages
- Enterprise Architect (EA) specific extensions
- Associations and generalisations
- Attributes with data types and multiplicities
- Stereotypes and tagged values
- Bidirectional association handling
Format Identifier
Format: xmi
File Extension: .xmi, .xml
MIME Type: application/xmi+xml
Direction Support
| Direction | Supported | Version |
|---|---|---|
| Import | Yes | 1.7.2 |
| Export | No | N/A |
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| mergeAssociations | Boolean | true | Merge bidirectional associations into single data elements |
| namingConvention | Choice | Raw | Naming strategy: Raw (preserve original) or FullyQualified (include package path) |
| notesPrefix | String | (empty) | Prefix to add to imported notes/documentation |
| deterministicIds | Boolean | false | Generate deterministic IDs based on element names for reproducible imports |
| respectNavigability | Boolean | true | Honour UML navigability settings on association ends |
| collapseBidirectional | Boolean | true | Collapse bidirectional associations to avoid duplication |
UML Element Mapping
XMI UML elements are mapped to Mauro as follows:
- UML Package
- Maps to nested data classes or model metadata
- UML Class
- Maps to Mauro data class
- UML Attribute
- Maps to data element with appropriate data type
- UML Association
- Maps to reference type data elements or relationship metadata
- UML Generalisation
- Captured as metadata on child classes
- UML Stereotype
- Maps to metadata with stereotype name and values
Import XMI Model
MauroImportExport.Cli import xmi model.xmi output.json --param mergeAssociations=true
Import with Fully Qualified Names
MauroImportExport.Cli import xmi ea-model.xmi model.json \
--param namingConvention=FullyQualified \
--param deterministicIds=true
Import EA Model with Custom Settings
MauroImportExport.Cli import xmi enterprise-architect.xmi output.json \
--param respectNavigability=true \
--param collapseBidirectional=true \
--verbose
Supported UML Tools
The XMI importer has been tested with:
- Enterprise Architect (EA) 15.x and later
- Sparx Systems Enterprise Architect exports
- UML 2.x XMI exports from Eclipse UML2
- MagicDraw/Cameo exports
Enterprise Architect Extensions
The importer recognises and processes EA-specific extensions:
- EA link elements for associations
- Tagged values and stereotypes
- Package hierarchies and diagrams
- Custom attributes and metadata
Best Practices
- Use
mergeAssociations=trueto avoid duplicate relationship representations - Enable
deterministicIdsfor repeatable imports in version control - Use
FullyQualifiednaming when packages contain classes with identical names - Enable verbose logging to track association and stereotype processing
- Export from source tools using XMI 2.1 or later for best compatibility
Limitations
- Import only (no XMI export currently available)
- Focus on class diagrams; other UML diagrams are not fully supported
- Some tool-specific extensions may not be fully preserved
- Complex UML constraints may be simplified