Home
Categories
Dictionary
Download
Project Details
Changes Log
FAQ
License

ResolverSAXHandler



The XMLSAXParser class simplifies the creation of XML SAX parser. It works with the ResolverSAXHandler handler.

Overview

The class extends the DefaultHandler2 class and implements the LSResourceResolver interface. You can use the method in the DefaultHandler2 class. For example:

StartElement method

The default implementation of the startElement method declares that an element has been received. You should call the superclass at the beginning of this method:
  super.startElement(...)

Handling errors

This class stored the list of parser errors encountered during the parsing. The ResolverSAXHandler.getExceptionResults() method allows to get the list of errors.

Each error is an instance of the ResolverSAXHandler.ExceptionResult class.

Adding informations

It is also possible to create a ResolverSAXHandler.InformationResult elements, which are a subclass of the ExceptionResult to store an information.

Additional properties

It is possible to add additional properties to any error or information. These properties will not be used during the parsing but can be useful for the client code. For example:

See also


Categories: packages | xml

Copyright 2006-2024 Herve Girod. All Rights Reserved. Documentation and source under the LGPL v2 and Apache 2.0 licences