Previous | Next | Index | TOC | Top | Top Contents Index Glossary


3b. Other SAX APIs

Link Summary
Local Links

Glossary Terms

namespace

This page continues the overview of the SAX APIs, summarizing those you are most likely to use when building a SAX-based application.

Additional SAX Interfaces

In addition to the APIs described in the overview section, the org.xml.sax package defines a few other interfaces that you are likely to use when you write a SAX application.

Interface Description

AttributeList

Defines methods that return the attributes defined for a tag, and their values. When the startElement method is invoked in a DocumentHandler, for example, an AttributeList object that encapsulates the attribute values is passed as an argument.

Locator Defines methods that return document-location information. Includes methods like getSystemId() which returns the local URL for a document and getLineNumber(), which gives the starting position of the last item that the SAX parser processed. Less frequently used methods include getPublicId(), which returns a document URI, and getColumnNumber().

Utility Package

The utility package, com.sun.xml.util, contains a number of classes that are helpful for building real-world applications.

Class Description

MessageCatalog

This class helps when building localized applications. It lets you use an identifier to look up a string for a given language. The code uses the same identifier, but changing the language produces messages that are appropriate for the selected locale.

XmlChars The methods in this class tell whether a character is valid in a given role (for example, as part of a name) according to the XML specification.
XmlNames The methods in this class tell whether an identifier is valid in a given role (for example, as a name, token, or qualified name) according to the XML and XML Namespace specifications.

Previous | Next | Index | TOC | Top | Top Contents Index Glossary