Documentation Language: Swift

Structure

XMISerializer

Serialises EMF objects to XMI (XML Metadata Interchange) format

struct XMISerializer

Overview

The XMI serialiser converts in-memory object graphs stored in Resources to XMI files. It handles:

Cross-Resource References

When a reference points to an object in another resource (represented as a ResourceProxy), the serializer generates an href with the target resource’s URI and fragment:

<mainDepartment href="department-b.xmi#/"/>

Usage Example

let serializer = XMISerializer()
try await serializer.serialize(resource, to: outputURL)

Topics

Initializers

?
init()

Initialise a new XMI serialiser

Instance Methods

F
serialize(_:)

Serialise a Resource to an XMI string

F
serialize(_:to:)

Serialise a Resource to an XMI file

Relationships

Conforms To

See Also

Resources and Serialisation

?
Resource

A resource manages model objects and provides EMF-compliant reference resolution.

?
ResourceSet

A resource set manages multiple resources and enables cross-resource reference resolution.

?
XMIParser

Parser for XMI (XML Metadata Interchange) files

?
JSONParser

Parser for JSON files in emfjson/pyecore format

S
JSONSerializer

Serializes EMF objects to JSON format (emfjson/pyecore compatible)