EMF >> Resource >> Save, load
ResourceSet resourceSet = new ResourceSetImpl();
URI fileURI =
URI.createFileURI(new File("mypo.xml").getAbsolutePath());
Resource poResource = resourceSet.createResource(fileURI);
poResource.getContents().add(aPurchaseOrder);
poResource.save(null);
ResourceSet resourceSet = new ResourceSetImpl();
URI fileURI =
URI.createFileURI(new File("mypo.xml").getAbsolutePath());
Resource poResource = resourceSet.getResource(fileURI, true);
PurchaseOrder aPurchaseOrder =
(PurchaseOrder)poResource.getContents().get(0);