JadeXMLException Class

The JadeXMLException class is the transient class that defines behavior for exceptions that occur as a result of XML processing. The Exception class errorItem and extendedErrorText properties and the JadeXMLException class properties are used to describe the XML processing exception in more detail.

The constants provided by the JadeXMLException class are listed in the following table.

Constant Value Returned when you attempt to …
CannotParsePersistent 8910 Parse an XML document into a persistent object tree using the parseFile or parseFile method of the JadeXMLDocument class. This is not allowed. To parse persistent documents, you must use the JadeXMLDocumentParser class and set up a mapping of node.
DocTypeAlreadyDefined 8903 Add a document type declaration to an XML document and one exists already. An XML document can have only one document type declaration.
InvalidClassMapping 8909 Set an invalid mapping for a JadeXMLNode class. The mapping is used when instances are created during the parsing of an XML document.
InvalidHierarchyRequest 8905 Add a node to an XML document at an invalid position; for example, moving an element to before a document or attribute.
NullNode 8904 Pass a null node reference to an XML processing method and the parameter cannot be null; for example, specifying a null value as the destination position when moving a node in the document tree.
ParserCreateFailed 8900 Create an instance of the XML parsing engine that cannot be created.
ParserError 8901 Parse an XML document and an error occurs; for example, the document is not well-formed.
ParserNodeMismatch 8908 Access an XML parser object on a different node to the one that created the parser; for example, when a parser is opened on a client node and a server method attempts to use the parser, this exception is raised.
RootElementAlreadyDefined 8902 Add a root (top-level) element to an XML document and one exists already. An XML document must have a single root element.
StringToUTF8Failed 8906 Parse an XML document that cannot be converted from JADE native format to UTF8 format.
UTF8ToStringFailed 8907 Parse an XML document that cannot be converted from UTF8 format to JADE native format.

The properties defined in the JadeXMLException class are summarized in the following table.

Property Contains the …
columnNumber Column number of text where the exception occurred
fileName Name of the file where the exception occurred
lineNumber Line number of text where the exception occurred

For details, see "JadeXMLException Class", in Chapter 1 of the JADE Encyclopaedia of Classes.