MEGA Administration : Technical Articles (EN) : Description of MEGA Data Exchange XML Format : Format in Detail : Commands description: <Add>, <Delete>, <Replace> tags : • Object and link creation commands
   
Object and link creation commands
<?xml version="1.0" encoding="ISO-8859-1"?>
<MegaExchange>
<Header>
<!-- document information -->
<Attribute metaattribute.name="xmg_version">XMG version 0.1</Attribute>
</Header>
<Commands>
<!-- exchanged commands -->
<Add>
<Object metaclass.name="Class">
<Attribute metaattribute.name="UML ClassName (Français)">Ma classe</Attribute>
</Object>
</Add>
<Add>
<Link frommetaclass.name="Package" metaassociationend.name="Contained class ">
<Object metaclass.name="Package">
<Attribute metaattribute.name="Name">My package</Attribute>
</Object>
<Object metaclass.name="Class">
<Attribute metaattribute.name="Name">My org-unit</Attribute>
</Object>
<Attribute metaattribute.name="Order">9999</Attribute>
</Link>
</Add>
</Commands>
</MegaExchange>
Object Descriptions
Objects are described by the <Object> tag..
The MetaClass of the object is identified by the name or MEGA absolute identifier (idabs in hexadecimal) of the MetaClass. The name of the MetaClass is specified by the value of the "metaclass.name" attribute of the <Object> tag, the idabs of the MetaClass is specified by the value of the "metaclass.id" attribute of the <Object> tag.
In addition, the objects themselves must be identified when we wish to make reference to them in the exchange document (see Object identification mechanisms).