During serialization, an XML object is represented as XML data.
To write an IlrXmlObject to an XML document:
-
Use code such as the following:
IlrReflect model = ... // the model specifying the structure of the
XML document
IlrXmlObject myObject = ... // An existing XML object
try {
driver.setModel ( model ); // not necessary if the schema is already loaded
Writer writer = new FileWriter ("xmlFile.xml");
driver.writeObject ( myObject, writer );
} catch ( IlrXmlErrorException e ) {
// some loading error
}
Related Concepts
Related Tasks