Library for reading XMI files into UML models and vice versa.
For mapping from XML files to XMI graphs see OpenPonk/xmi.
For details on the used UML metamodel, see OpenPonk/uml-metamodel.
Metacello new
baseline: 'OPUMLXMI';
repository: 'github://OpenPonk/uml-xmi/repository';
load.
Reading a XML string/stream without any references.
model := OPUMLXMIReader readFrom: aXmlStringStream.
Reading a XML string with a pathmap.
pathmap := OPUMLXMIPathmap new.
pathmap add: 'http://www.omg.org/spec/UML/20131001/PrimitiveTypes.xmi'.
pathmap add: 'http://www.omg.org/spec/UML/20131001/UML.xmi' retrieveUsing: [ '/home/user/UML.xmi' asFileReference contents ].
model := OPUMLXMIReader readXmi: aXmlStringStream pathmap: pathmap.
Writing a UML model into a XML string.
OPUMLXMIWriter toString: aUmlModel.