Generated by
JDiff

org.xml.sax.helpers Documentation Differences

This file contains all the changes in documentation in the package org.xml.sax.helpers as colored differences. Deletions are shown like this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.

Class AttributeListImpl

Default implementation for AttributeList.
This module both source code and documentation is in the Public Domain and comes with NO WARRANTY.

AttributeList implements the deprecated SAX1 AttributeList interface and has been replaced by the new SAX2 AttributesImpl interface.

This class provides a convenience implementation of the SAX AttributeList interface. This implementation is useful both for SAX parser writers who can use it to provide attributes to the application and for SAX application writers who can use it to create a persistent copy of an element's attribute specifications:

 private AttributeList myatts; public void startElement (String name AttributeList atts) { // create a persistent copy of the attribute list // for use outside this method myatts = new AttributeListImpl(atts); [...] } 

Please note that SAX parsers are not required to use this class to provide an implementation of AttributeList; it is supplied only as an optional convenience. In particular parser writers are encouraged to invent more efficient implementations.

@deprecated This class implements a deprecated interface AttributeList that interface has been replaced by Attributes which is implemented in the AttributesImpl helper class. @since SAX 1.0 @author David Megginson sax@megginson.com @version 2.00r2pre @see org.xml.sax.AttributeList @see org.xml.sax.DocumentHandler#startElement

Class AttributesImpl

Default implementation of the Attributes interface.
This module both source code and documentation is in the Public Domain and comes with NO WARRANTY.

This class provides a default implementation of the SAX2 Attributes interface with the addition of manipulators so that the list can be modified or reused.

There are two typical uses of this class:

  1. to take a persistent snapshot of an Attributes object in a startElement event; or
  2. to construct or modify an Attributes object in a SAX2 driver or filter.

This class replaces the now-deprecated SAX1 AttributeListImpl class; in addition to supporting the updated Attributes interface rather than the deprecated AttributeList interface it also includes a much more efficient implementation using a single array rather than a set of Vectors.

@since SAX 2.0 @author David Megginson sax@megginson.com @version 2.00r2pre

Class DefaultHandler

Default base class for SAX2 event handlers.
This module both source code and documentation is in the Public Domain and comes with NO WARRANTY.

This class is available as a convenience base class for SAX2 applications: it provides default implementations for all of the callbacks in the four core SAX2 handler classes:

Application writers can extend this class when they need to implement only part of an interface; parser writers can instantiate this class to provide default handlers when the application has not supplied its own.

This class replaces the deprecated SAX1 HandlerBase class.

@since SAX 2.0 @author David Megginson sax@megginson.com @version 2.00r2pre w/ JAXP 1.1 signatures @see org.xml.sax.EntityResolver @see org.xml.sax.DTDHandler @see org.xml.sax.ContentHandler @see org.xml.sax.ErrorHandler
Class DefaultHandler, InputSource resolveEntity(String, String)

Resolve an external entity.

Always return null so that the parser will use the system identifier provided in the XML document. This method implements the SAX default behaviour: application writers can override it in a subclass to do special translations such as catalog lookups or URI redirection.

@param publicId The public identifer or null if none is available. @param systemId The system identifier provided in the XML document. @return The new input source or null to require the default behaviour. @exception java.io.IOException If there is an error setting up the new input source. @exception org.xml.sax.SAXException Any SAX exception possibly wrapping another exception. @see org.xml.sax.EntityResolver#resolveEntity

Class LocatorImpl

Provide an optional convenience implementation of Locator.
This module both source code and documentation is in the Public Domain and comes with NO WARRANTY.

This class is available mainly for application writers who can use it to make a persistent snapshot of a locator at any point during a document parse:

 Locator locator; Locator startloc; public void setLocator (Locator locator) { // note the locator this.locator = locator; } public void startDocument () { // save the location of the start of the document // for future use. Locator startloc = new LocatorImpl(locator); } 

Normally parser writers will not use this class since it is more efficient to provide location information only when requested rather than constantly updating a Locator object.

@since SAX 1.0 @author David Megginson sax@megginson.com @version 2.00r2pre @see org.xml.sax.Locator Locator

Class NamespaceSupport

Encapsulate Namespace logic for use by SAX drivers.
This module both source code and documentation is in the Public Domain and comes with NO WARRANTY.

This class encapsulates the logic of Namespace processing: it tracks the declarations currently in force for each context and automatically processes qualified XML 1.0 names into their Namespace parts; it can also be used in reverse for generating XML 1.0 from Namespaces.

Namespace support objects are reusable but the reset method must be invoked between each session.

Here is a simple session:

 String parts[] = new String[3]; NamespaceSupport support = new NamespaceSupport(); support.pushContext(); support.declarePrefix("" "http://www.w3.org/1999/xhtml"); support.declarePrefix("dc" "http://www.purl.org/dc#"); String parts[] = support.processName("p" parts false); System.out.println("Namespace URI: " + parts[0]); System.out.println("Local name: " + parts[1]); System.out.println("Raw name: " + parts[2]); String parts[] = support.processName("dc:title" parts false); System.out.println("Namespace URI: " + parts[0]); System.out.println("Local name: " + parts[1]); System.out.println("Raw name: " + parts[2]); support.popContext(); 

Note that this class is optimized for the use case where most elements do not contain Namespace declarations: if the same prefix/URI mapping is repeated for each context (for example) this class will be somewhat less efficient.

@since SAX 2.0 @author David Megginson sax@megginson.com @version 2.00r2pre

Class ParserAdapter

Adapt a SAX1 Parser as a SAX2 XMLReader.
This module both source code and documentation is in the Public Domain and comes with NO WARRANTY.

This class wraps a SAX1 Parser and makes it act as a SAX2 XMLReader with feature property and Namespace support. Note that it is not possible to report skippedEntity events since SAX1 does not make that information available.

This adapter does not test for duplicate Namespace-qualified attribute names.

@since SAX 2.0 @author David Megginson sax@megginson.com @version 2.00r2pre @see org.xml.sax.helpers.XMLReaderAdapter @see org.xml.sax.XMLReader @see org.xml.sax.Parser

Class XMLFilterImpl

Base class for deriving an XML filter.
This module both source code and documentation is in the Public Domain and comes with NO WARRANTY.

This class is designed to sit between an XMLReader and the client application's event handlers. By default it does nothing but pass requests up to the reader and events on to the handlers unmodified but subclasses can override specific methods to modify the event stream or the configuration requests as they pass through.

@since SAX 2.0 @author David Megginson sax@megginson.com @version 2.00r2pre @see org.xml.sax.XMLFilter @see org.xml.sax.XMLReader @see org.xml.sax.EntityResolver @see org.xml.sax.DTDHandler @see org.xml.sax.ContentHandler @see org.xml.sax.ErrorHandler

Class XMLReaderAdapter

Adapt a SAX2 XMLReader as a SAX1 Parser.
This module both source code and documentation is in the Public Domain and comes with NO WARRANTY.

This class wraps a SAX2 XMLReader and makes it act as a SAX1 Parser The XMLReader must support a true value for the http://xml.org/sax/features/namespace-prefixes property or parsing will fail with a SAXException if the XMLReader supports a false value for the http://xml.org/sax/features/namespaces property that will also be used to improve efficiency.

@since SAX 2.0 @author David Megginson sax@megginson.com @version 2.00r2pre @see org.xml.sax.Parser @see org.xml.sax.XMLReader