/** * model to string * * @return * @throws Exception */ private String createResourceToString() throws Exception { XMLResourceImpl resource = new XMLResourceImpl(); resource.setEncoding("UTF-8"); resource.getContents().add(db); XMLProcessor processor = new XMLProcessor(); return processor.saveToString(resource, null); }
/** * Register for "*" and "xml" file extensions the Domain_3_0ResourceFactoryImpl factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override protected Map<String, Resource.Factory> getRegistrations() { if (registrations == null) { super.getRegistrations(); registrations.put(XML_EXTENSION, new Domain_3_0ResourceFactoryImpl()); registrations.put(STAR_EXTENSION, new Domain_3_0ResourceFactoryImpl()); } return registrations; }