The JadeXMLParser class is the abstract transient class that defines behavior for parsing XML documents. The parser reads an XML document and reports basic document-related events; for example, the start and end of elements and character data. (See also "
The JADE XML Parser model reads an XML document from beginning to end. As it encounters start-tags, end-tags, text, comments, and so on, it notifies the client application by calling event handler methods defined by the application.
Define a subclass of the JadeXMLParser class in your application and implement callback methods for events about which you require notification. The application creates an instance of the subclass and then calls the parseFile or parseString method to parse an XML document.
The parser raises a JadeXMLException object if it detects any errors resulting from XML documents that are not well-formed.
The order of events is very important, and mirrors the order of information in the document itself. For example, all contents of a JadeXMLElement (that is, character data, processing instructions, and any sub-elements) appear in order between the startElement event and the corresponding endElement event.
For examples of using methods defined in the JadeXMLParser class to parse a document and print the names of the elements in that document, showing the hierarchy, and to check that documents are well-formed, see "
For details about the methods defined in the JadeXMLParser class, see "JadeXMLParser Methods", in the following section. See also "