Writing to XML documents for the decision engine
Write an XML object for use with the decision engine to an XML document by using IlrXmlObject.
About this task
During serialization, XML objects are represented as XML data. You can write an XML object to a document by using the IlrXmlObject class.
Procedure
To write an XML object to an XML document:
Use the IlrXmlObject instance as
follows:
EngineDefinition definition = ...
XmlBindingService xmlBindingService = definition.getService(XmlBindingService.class);
IlrXmlDataDriver driver = xmlBindingService.getDataDriver();
IlrXmlObject myObject = ... // An existing XML object
try {
Writer writer = new FileWriter ("xmlFile.xml");
driver.writeObject ( myObject, writer );
} catch ( IlrXmlErrorException e ) {
// some writing error
}