|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xml.sax.helpers.DefaultHandler | +--gnu.xml.util.DefaultHandler
This class extends the SAX base handler class to support the SAX2 Lexical and Declaration handlers. All the handler methods do is return; except that the SAX base class handles fatal errors by throwing an exception.
Constructor Summary | |
DefaultHandler()
Constructs a handler which ignores all parsing events. |
Method Summary | |
void |
attributeDecl(java.lang.String element,
java.lang.String name,
java.lang.String type,
java.lang.String defaultType,
java.lang.String defaltValue)
SAX2: called on attribute declarations |
void |
comment(char[] buf,
int off,
int len)
SAX2: called when comments are parsed |
void |
elementDecl(java.lang.String name,
java.lang.String model)
SAX2: called on element declarations |
void |
endCDATA()
SAX2: called after parsing CDATA characters |
void |
endDTD()
SAX2: called after the doctype is parsed |
void |
endEntity(java.lang.String name)
SAX2: called after parsing a general entity in content |
void |
externalEntityDecl(java.lang.String name,
java.lang.String pubid,
java.lang.String sysid)
SAX2: called on external entity declarations |
void |
internalEntityDecl(java.lang.String name,
java.lang.String value)
SAX2: called on internal entity declarations |
void |
startCDATA()
SAX2: called before parsing CDATA characters |
void |
startDTD(java.lang.String root,
java.lang.String pubid,
java.lang.String sysid)
SAX2: called when the doctype is partially parsed |
void |
startEntity(java.lang.String name)
SAX2: called before parsing a general entity in content |
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultHandler()
Method Detail |
public void startCDATA() throws SAXException
startCDATA
in interface LexicalHandler
org.xml.sax.ext.LexicalHandler
SAXException
- The application may raise an exception.LexicalHandler.endCDATA()
public void endCDATA() throws SAXException
endCDATA
in interface LexicalHandler
org.xml.sax.ext.LexicalHandler
SAXException
- The application may raise an exception.LexicalHandler.startCDATA()
public void startDTD(java.lang.String root, java.lang.String pubid, java.lang.String sysid) throws SAXException
startDTD
in interface LexicalHandler
org.xml.sax.ext.LexicalHandler
name
- The document type name.publicId
- The declared public identifier for the
external DTD subset, or null if none was declared.systemId
- The declared system identifier for the
external DTD subset, or null if none was declared.SAXException
- The application may raise an
exception.LexicalHandler.endDTD()
,
LexicalHandler.startEntity(java.lang.String)
public void endDTD() throws SAXException
endDTD
in interface LexicalHandler
org.xml.sax.ext.LexicalHandler
SAXException
- The application may raise an exception.LexicalHandler.startDTD(java.lang.String, java.lang.String, java.lang.String)
public void startEntity(java.lang.String name) throws SAXException
startEntity
in interface LexicalHandler
org.xml.sax.ext.LexicalHandler
name
- The name of the entity. If it is a parameter
entity, the name will begin with '%', and if it is the
external DTD subset, it will be "[dtd]".SAXException
- The application may raise an exception.LexicalHandler.endEntity(java.lang.String)
,
DeclHandler.internalEntityDecl(java.lang.String, java.lang.String)
,
DeclHandler.externalEntityDecl(java.lang.String, java.lang.String, java.lang.String)
public void endEntity(java.lang.String name) throws SAXException
endEntity
in interface LexicalHandler
org.xml.sax.ext.LexicalHandler
name
- The name of the entity that is ending.SAXException
- The application may raise an exception.LexicalHandler.startEntity(java.lang.String)
public void comment(char[] buf, int off, int len) throws SAXException
comment
in interface LexicalHandler
org.xml.sax.ext.LexicalHandler
ch
- An array holding the characters in the comment.start
- The starting position in the array.length
- The number of characters to use from the array.SAXException
- The application may raise an exception.public void attributeDecl(java.lang.String element, java.lang.String name, java.lang.String type, java.lang.String defaultType, java.lang.String defaltValue) throws SAXException
attributeDecl
in interface DeclHandler
org.xml.sax.ext.DeclHandler
eName
- The name of the associated element.aName
- The name of the attribute.type
- A string representing the attribute type.valueDefault
- A string representing the attribute default
("#IMPLIED", "#REQUIRED", or "#FIXED") or null if
none of these applies.value
- A string representing the attribute's default value,
or null if there is none.SAXException
- The application may raise an exception.public void elementDecl(java.lang.String name, java.lang.String model) throws SAXException
elementDecl
in interface DeclHandler
org.xml.sax.ext.DeclHandler
name
- The element type name.model
- The content model as a normalized string.SAXException
- The application may raise an exception.public void externalEntityDecl(java.lang.String name, java.lang.String pubid, java.lang.String sysid) throws SAXException
externalEntityDecl
in interface DeclHandler
org.xml.sax.ext.DeclHandler
name
- The name of the entity. If it is a parameter
entity, the name will begin with '%'.publicId
- The declared public identifier of the entity, or
null if none was declared.systemId
- The declared system identifier of the entity.SAXException
- The application may raise an exception.DeclHandler.internalEntityDecl(java.lang.String, java.lang.String)
,
DTDHandler.unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
public void internalEntityDecl(java.lang.String name, java.lang.String value) throws SAXException
internalEntityDecl
in interface DeclHandler
org.xml.sax.ext.DeclHandler
name
- The name of the entity. If it is a parameter
entity, the name will begin with '%'.value
- The replacement text of the entity.SAXException
- The application may raise an exception.DeclHandler.externalEntityDecl(java.lang.String, java.lang.String, java.lang.String)
,
DTDHandler.unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
|
Source code is GPL'd in the JAXP subproject at http://savannah.gnu.org/projects/classpathx |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |