| ILOG JRules User Guide > Integrating Application Data > Tasks > Using the XML Binding API > Configuring XML Binding > Handling XML Binding Error and Warning Messages |
Handling XML Binding Error and Warning Messages |
PREVIOUS NEXT |
There are three types of error in the XML specification: error, fatal error and warning.
The package ilog.rules.xml defines the error classes and exceptions returned by an XML file parser:
IlrXmlError interface defines the base error or warning returned by an XML parser.
IlrXmlErrorException class defines the exception thrown by an XML parser when errors occur.
ilog.rules.xml.util.IlrXmlFatalErrorException class defines the exception thrown by an XML parser when fatal errors occur.
In general, you pass a schema, an XML document, and a handler object to the XML driver, which processes the XML and invokes the appropriate methods.
A user handler that is linked to a Simple API for XML (SAX) parser is notified of any SAX event during the parsing of a schema or an XML document. SAX is the protocol that most servlets and network-oriented programs use to transmit and receive XML documents because it is the fastest and least memory-intensive mechanism that is currently available for dealing with XML documents.
Rather than building a complete representation of the XML document, the SAX parser fires off a series of events as it reads the document from beginning to end. These events are passed to the event handler, which provides access to the contents of the document.
To implement and declare an XML error handler:
ilog.rules.xml.util.IlrXmlErrorHandler interface enables you to filter or declare new errors during XML parsing.
IlrXmlErrorHandler interface and declare it to an XML driver during its initialization to activate the XML binding error handling process.
IlrXmlErrorManager methods.
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |