|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
AttributeListEx | This interface extends the SAX AttributeList interface to expose information needed to support DOM Level 1 features used in document editing, and detection of ID attributes which are declared for an element. |
DtdEventListener | When parsing XML documents, DTD related events are signaled through this interface. |
LexicalEventListener | Provides notification of information which DOM permits to be exposed. |
Class Summary | |
Parser | This implements a fast non-validating SAX parser. |
Resolver | This entity resolver class provides a number of utilities which can help managment of external parsed entities in XML. |
ValidatingParser | This parser tests XML documents against the validity constraints specified in the XML 1.0 specification as it parses them. |
This package holds two fast "XML Processors" as defined in the XML 1.0 specification; these are parsers (validating and non-validating) with some supporting classes and interfaces. The parsers support the SAX 1.0 API, and do not at this time expose DTD or lexical information useful for advanced applications (such as XML editors) which sometimes need such data. They are highly conformant to the XML 1.0 specification, and support a large number of character encodings beyond the UTF-8 and UTF-16 support that is required of all XML processors.
For better support of DOM, and ID-based element retrieval (such as that used in XSL and in XML Linking), the attribute lists passed to the DocumentHandler.startElement method implement the AttributeListEx interface. Similarly, additional DTD information (exposed by DOM for editor support) is accessible through an extended DtdEventListener interface.
An optimization that may be of interest is usable only with the nonvalidating parser and applies only to standalone documents. When the input document is a valid standalone document, it can be processed more quickly by not reading external parameter entities and by not normalizing or defaulting attributes. The optimization is not enabled by default, because some validity errors will then be misreported (as fatal "well formedness" errors). Also, applications are written to expect normalized attribute values; they may not be correctly normalized when the document is not in fact truly valid.
It also includes static factory methods to return input sources given java.io.File and java.net.URL objects.
Another feature of the Resolver class is a factory method that transforms MIME typed byte streams into SAX InputSource objects. This simplifies building systems that use MIME with XML and can't pass URIs to parsers, such as applications that send and receive XML documents as messages. Examples of such applications include servlets accepting input data as XML from HTTP methods such as POST or PUT. JavaMail based applications, and clients using HTTP POST/PUT to send data to a servlet or another web application server component.
In all cases that an encoding other than UTF-8 or UTF-16 is in use, an encoding declaration should be used.
|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |