public class DefaultHandler extends DefaultHandler implements LexicalHandler, DeclHandler
Constructor and Description |
---|
DefaultHandler()
Constructs a handler which ignores all parsing events.
|
Modifier and Type | Method and Description |
---|---|
void |
attributeDecl(String element,
String name,
String type,
String defaultType,
String defaltValue)
SAX2: called on attribute declarations
|
void |
comment(char[] buf,
int off,
int len)
SAX2: called when comments are parsed
|
void |
elementDecl(String name,
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(String name)
SAX2: called after parsing a general entity in content
|
void |
externalEntityDecl(String name,
String pubid,
String sysid)
SAX2: called on external entity declarations
|
void |
internalEntityDecl(String name,
String value)
SAX2: called on internal entity declarations
|
void |
startCDATA()
SAX2: called before parsing CDATA characters
|
void |
startDTD(String root,
String pubid,
String sysid)
SAX2: called when the doctype is partially parsed
|
void |
startEntity(String name)
SAX2: called before parsing a general entity in content
|
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
public DefaultHandler()
public void startCDATA() throws SAXException
startCDATA
in interface LexicalHandler
SAXException
- The application may raise an exception.LexicalHandler.endCDATA()
public void endCDATA() throws SAXException
endCDATA
in interface LexicalHandler
SAXException
- The application may raise an exception.LexicalHandler.startCDATA()
public void startDTD(String root, String pubid, String sysid) throws SAXException
startDTD
in interface LexicalHandler
root
- The document type name.pubid
- The declared public identifier for the
external DTD subset, or null if none was declared.sysid
- 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
SAXException
- The application may raise an exception.LexicalHandler.startDTD(java.lang.String, java.lang.String, java.lang.String)
public void startEntity(String name) throws SAXException
startEntity
in interface 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(String name) throws SAXException
endEntity
in interface 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
buf
- An array holding the characters in the comment.off
- The starting position in the array.len
- The number of characters to use from the array.SAXException
- The application may raise an exception.public void attributeDecl(String element, String name, String type, String defaultType, String defaltValue) throws SAXException
attributeDecl
in interface DeclHandler
element
- The name of the associated element.name
- The name of the attribute.type
- A string representing the attribute type.defaultType
- A string representing the attribute default
("#IMPLIED", "#REQUIRED", or "#FIXED") or null if
none of these applies.defaltValue
- A string representing the attribute's default value,
or null if there is none.SAXException
- The application may raise an exception.public void elementDecl(String name, String model) throws SAXException
elementDecl
in interface DeclHandler
name
- The element type name.model
- The content model as a normalized string.SAXException
- The application may raise an exception.public void externalEntityDecl(String name, String pubid, String sysid) throws SAXException
externalEntityDecl
in interface DeclHandler
name
- The name of the entity. If it is a parameter
entity, the name will begin with '%'.pubid
- The declared public identifier of the entity, or
null if none was declared.sysid
- 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(String name, String value) throws SAXException
internalEntityDecl
in interface 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)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses