ILOG JRules User Guide > Integrating Application Data > Tasks > Using the Dynamic XOM API > Persisting the XOM

As soon as an XML schema is transformed into a XOM, the persistence of the XOM is sufficient to initialize a new data driver. In other words, every important piece of information contained in an XSD file is saved in the XOM as properties.

To use the XOM's persistence feature:

IlrXmlDataDriver driver = ...;
// Write the XOM
Writer writer = ...;
driver.getModel().writeModel ( writer);
 
// Read the XOM.
Reader reader =...;
IlrReflect newModel = new IlrReflect ( );
IlrJavaSerializer serialiser = new IlrJavaSerializer ();
serialiser.readObjectModel ( newModel, reader);
driver.setModel ( newModel );

Related Concepts

XML Binding
Web Service Binding
Persistence Layer