- XMI

XMI provides a way to store instances of objects to an XML document, this allows objects to be serialised. XML is not object oriented, so XMI needs to define elements and attributes to hold the object in a standard way.
The XMI schema also extends the XML schema so that definitions of objects can be stored. This provives a way to hold a UML model.
An Example of an XMI file
I created the following very simple java classes:
package xmiexample;
public class dimension {
double x,y,z;
public dimension(x1,y1,z1) {
x=x1;
y=y1;
z=z1;
}
public double getX(){
return x;
}
public double getY(){
return y;
}
public double getZ(){
return z;
}
}
package xmiexample;
public class box {
dimension size;
String name;
public box() {
}
public String getName(){
return name;
}
public double getX(){
return size.getX();
}
}





