During deserialization, an XML object is created from the XML document. You can then read the XML document and represent it as an IlrXmlObject instance. Errors may be thrown if the document format is not valid.
To read an XML document and represent it as an IlrXmlObject instance:
-
Use code such as the following:
IlrReflect model = ... // the model representing the XML document
//return the root XML object of the XML file
driver.setModel ( model ); // not necessary if the schema is already loaded
Reader reader = new FileReader ("xmlFile.xml");
IlrXmlObject myObject = driver.readObject (reader);
} catch ( IlrXmlErrorException e ) {
Related Concepts
Related Tasks