# XMI generator

As it is signified by their name, the XMI generators generates the definition of the project using XMI.

They are two generators, one producing XMI 1.2 the other XMI 2.1

## XMI 1.2 generator

To be compatible with existing tools, the used format is xml 1.0, xmi 1.2 for UML 1.4.

This plug-out must applied on the project itself, it asks you to specify where the xmi file must be generated and if you want to produce the UML, C++ or Java definitions :

Currently only the UML definition of the packages, views (generated as package or not generated depending on the toggle above), classes, attributes, relations, operations, use cases, components (without UML2.0 features) and nodes are saved in the produced file. Classes defined under a use case or a use case view are generated as actor, their operations, attributes and relations are not generated except dependencies and generalizations.

The XMI generator manages the following options (in order) :

- -uml or -c++ or -java to specify the target language, mandatory if other arguments are given (except the port number given by Bouml itself)

- generated XMI file path (must not contains space)

- encoding, for instance windows-1252

- -view, optional, to generate views as package

- -simpleTv to generate tagged values with the simple form, -complexTv to generate tagged values with the complex form, else the tagged values are not generated

In case these arguments are given the dialog doesn't appears, this allows to export a project in XMI without any manual action.

These options may be set through the Tool setting dialog, or when you ask to start a plug-out when Bouml is lauched (see here).

## XMI 2.1 generator

The used format is xml 1.0, xmi 2.1 for UML 2.0 or 2.1

This plug-out must applied on the project itself, it asks you to specify where the xmi file must be generated and if you want to produce the UML, C++ or Java definitions following some options :

The XMI generator manages the following options (in order) :

- -uml or -c++ or -java to specify the target language, mandatory if other arguments are given (except the port number given by Bouml itself)

- generated XMI file path (must not contains space)

- encoding, for instance UTF-8

- -view, optional, to generate views as package

- -uml2.0, optional, to generate for UML 2.0 rather than UML 2.1

- -pk, optional, to prefix the parameter direction by pk_

- -vis, optional, to prefix the visibility by vis_

- -primitiveType, optional, to define primitive and derived types (like int *) through a primitive type rather than a data type

- -extension, optional, to ask the generator to produce or not through an extension the stereotypes and user properties (tagged value)

- -lf, optional, to produce the characters line feed and carriage return without modification, else there are replaced by &#10; and &#13;

In case these arguments are given the dialog doesn't appears, this allows to export a project in XMI without any manual action.

These options may be set through the Tool setting dialog, or when you ask to start a plug-out when Bouml is lauched (see here).

Previous : State machine generator

Next : XMI import