For applications where enforcing the rules in a document type declaration is not necessary, a wide variety of choices and design tradeoffs is available.

The Open Source parsers are invariably non-validating.

SAX parsers may return all contiguous whitespace in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity, so that the Locator provides useful information. The Parser will invoke this method once for each processing instruction found: note that processing instructions may occur before or after the main document element.

no validating sax parser implementation available-67no validating sax parser implementation available-65

Raising an exception in this method will cause parsing to end.

With MSXML 6.0, SAX supports validation to XSD schemas but does not support validation using Document Type Definition (DTD) files.

Handler implementations should inherit from the base classes provided in the module Basic interface for resolving entities.

If you create an object implementing this interface, then register the object with your Parser, the parser will call the method in your object to resolve all external entities.

Called when the parser presents minor warning information to the application.

Parsing is expected to continue when this method returns, and document information will continue to be passed to the application.

Interface used by the parser to present error and warning messages to the application.

The methods of this object control whether errors are immediately converted to exceptions or are handled in some other way.

Note The earlier SAX 1 interface provided by the Python XML Special Interest Group used a more Java-like interface for this method.

Since most parsers used from Python did not take advantage of the older interface, the simpler signature was chosen to replace it.

There are three levels of errors available: warnings, (possibly) recoverable errors, and unrecoverable errors.