Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.xml.sax.ext.DefaultHandler2
public class DefaultHandler2
extends DefaultHandler
implements LexicalHandler, DeclHandler, EntityResolver2
LexicalHandler
, DeclHandler
, and
EntityResolver2
extensions. Except for overriding the
original SAX1 resolveEntity()
method the added handler methods just return. Subclassers may
override everything on a method-by-method basis.
This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY.Note: this class might yet learn that the ContentHandler.setDocumentLocator() call might be passed a
Locator2
object, and that the
ContentHandler.startElement() call might be passed a
Attributes2
object.
Constructor Summary | |
|
Method Summary | |
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
InputSource |
|
void |
|
InputSource |
|
InputSource |
|
void | |
void |
|
void |
|
Methods inherited from class org.xml.sax.helpers.DefaultHandler | |
characters , endDocument , endElement , endPrefixMapping , error , fatalError , ignorableWhitespace , notationDecl , processingInstruction , resolveEntity , setDocumentLocator , skippedEntity , startDocument , startElement , startPrefixMapping , unparsedEntityDecl , warning |
public void attributeDecl(String eName, String aName, String type, String mode, String value) throws SAXException
- Specified by:
- attributeDecl in interface DeclHandler
public void comment(ch[] , int start, int length) throws SAXException
- Specified by:
- comment in interface LexicalHandler
public void elementDecl(String name, String model) throws SAXException
- Specified by:
- elementDecl in interface DeclHandler
public void endEntity(String name) throws SAXException
- Specified by:
- endEntity in interface LexicalHandler
public void externalEntityDecl(String name, String publicId, String systemId) throws SAXException
- Specified by:
- externalEntityDecl in interface DeclHandler
public InputSource getExternalSubset(String name, String baseURI) throws SAXException, IOException
Tells the parser that if no external subset has been declared in the document text, none should be used.
- Specified by:
- getExternalSubset in interface EntityResolver2
public void internalEntityDecl(String name, String value) throws SAXException
- Specified by:
- internalEntityDecl in interface DeclHandler
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
InvokesEntityResolver2.resolveEntity()
with null entity name and base URI. You only need to override that method to use this class.
- Specified by:
- resolveEntity in interface EntityResolver
- Overrides:
- resolveEntity in interface DefaultHandler
public InputSource resolveEntity(String name, String publicId, String baseURI, String systemId) throws SAXException, IOException
Tells the parser to resolve the systemId against the baseURI and read the entity text from that resulting absolute URI. Note that because the olderDefaultHandler.resolveEntity()
, method is overridden to call this one, this method may sometimes be invoked with null name and baseURI, and with the systemId already absolutized.
- Specified by:
- resolveEntity in interface EntityResolver2
public void startCDATA() throws SAXException
- Specified by:
- startCDATA in interface LexicalHandler
public void startDTD(String name, String publicId, String systemId) throws SAXException
- Specified by:
- startDTD in interface LexicalHandler
public void startEntity(String name) throws SAXException
- Specified by:
- startEntity in interface LexicalHandler