public class DTDEventHandler extends Object implements ContentHandler, ErrorHandler, DeclHandler, LexicalHandler
Constructor and Description |
---|
DTDEventHandler() |
Modifier and Type | Method and Description |
---|---|
void |
attributeDecl(String eName,
String aName,
String type,
String valueDefault,
String value)
Creates a new Attribute using the declaration information provided
by the XML Reader
|
void |
characters(char[] values,
int param,
int param2) |
void |
comment(char[] text,
int start,
int length)
Handle comments.
|
void |
elementDecl(String name,
String model)
Builds Element from the declaration information provided by the parser
|
void |
endCDATA() |
void |
endDocument() |
void |
endDTD()
Signals that the DTD has been fully processed
|
void |
endElement(String str,
String str1,
String str2) |
void |
endEntity(String str) |
void |
endPrefixMapping(String str) |
void |
error(SAXParseException sAXParseException) |
void |
externalEntityDecl(String name,
String publicId,
String systemId)
Builds Entity from the declaration information provided by the parser
|
void |
fatalError(SAXParseException sAXParseException)
Stops processing of the DTD because a fatal error occured.
|
Attributes |
getAllAttributes()
Returns all declared Attributes
|
Elements |
getAllElements()
Returns all declared Elements
|
Entities |
getAllEntities()
Returns all declared Entities
|
SComments |
getAllSComments()
Returns the collection of structured comments
|
DtdModule |
getDtdModule()
Gets the DtdModule associated with this DTD.
|
void |
ignorableWhitespace(char[] values,
int param,
int param2) |
void |
internalEntityDecl(String name,
String value)
Builds Entity from declaration information provided by the parser
|
void |
processingInstruction(String str,
String str1) |
void |
setDocumentLocator(Locator locator)
Sets locator that identifies the DTD file in which a declaration occurs.
|
void |
skippedEntity(String str) |
void |
startCDATA() |
void |
startDocument()
Reinitializes all values so that declaration information can be collected
|
void |
startDTD(String str,
String str1,
String str2) |
void |
startElement(String str,
String str1,
String str2,
Attributes attributes)
Ends DTD processing because the parser has reached content.
|
void |
startEntity(String str)
Handler for the start of entities.
|
void |
startPrefixMapping(String str,
String str1) |
void |
warning(SAXParseException sAXParseException) |
public DtdModule getDtdModule()
public Attributes getAllAttributes()
public Elements getAllElements()
public Entities getAllEntities()
public SComments getAllSComments()
public void setDocumentLocator(Locator locator)
setDocumentLocator
in interface ContentHandler
locator
- Reports location information from the DTD during parsingpublic void startDocument() throws SAXException
startDocument
in interface ContentHandler
SAXException
- Indicates problem occurred during processingpublic void startElement(String str, String str1, String str2, Attributes attributes) throws SAXException
startElement
in interface ContentHandler
str
- Uri of namespacestr1
- localName of elementstr2
- Full name of element, including prefixattributes
- Element attributesEndOfDTDException
- Indicates that processing should endSAXException
public void characters(char[] values, int param, int param2) throws SAXException
characters
in interface ContentHandler
SAXException
public void endDocument() throws SAXException
endDocument
in interface ContentHandler
SAXException
public void endElement(String str, String str1, String str2) throws SAXException
endElement
in interface ContentHandler
SAXException
public void endPrefixMapping(String str) throws SAXException
endPrefixMapping
in interface ContentHandler
SAXException
public void ignorableWhitespace(char[] values, int param, int param2) throws SAXException
ignorableWhitespace
in interface ContentHandler
SAXException
public void processingInstruction(String str, String str1) throws SAXException
processingInstruction
in interface ContentHandler
SAXException
public void skippedEntity(String str) throws SAXException
skippedEntity
in interface ContentHandler
SAXException
public void startPrefixMapping(String str, String str1) throws SAXException
startPrefixMapping
in interface ContentHandler
SAXException
public void attributeDecl(String eName, String aName, String type, String valueDefault, String value) throws SAXException
attributeDecl
in interface DeclHandler
eName
- Element nameaName
- Attribute nametype
- Type of content of the attribute (eg, CDATA)valueDefault
- The mode, such as "#IMPLIED"; null if not specifiedvalue
- Default value or null if noneSAXException
- Thrown if the XML Reader did not supply a Locator or some other problem occurredpublic void elementDecl(String name, String model) throws SAXException
elementDecl
in interface DeclHandler
name
- Element namemodel
- Content modelSAXException
- Thrown if the XML Reader did not supply a Locator or some other problem occurredpublic void externalEntityDecl(String name, String publicId, String systemId) throws SAXException
externalEntityDecl
in interface DeclHandler
name
- Enity namepublicId
- Public id (if supplied)systemId
- System idSAXException
- Thrown if an Entity object cannot be instantiated (such as due to an invalid "type")public void internalEntityDecl(String name, String value) throws SAXException
internalEntityDecl
in interface DeclHandler
name
- Entity namevalue
- Entity valueSAXException
- Thrown if Entity object cannot be instantiated (such as due to an invalid "type")public void fatalError(SAXParseException sAXParseException) throws SAXException
fatalError
in interface ErrorHandler
sAXParseException
- The fatal error that stopped processingSAXException
- This will probably never be thrownpublic void error(SAXParseException sAXParseException) throws SAXException
error
in interface ErrorHandler
SAXException
public void warning(SAXParseException sAXParseException) throws SAXException
warning
in interface ErrorHandler
SAXException
public void endDTD() throws SAXException
endDTD
in interface LexicalHandler
SAXException
- Subclass indicates that the DTD has been processedpublic void comment(char[] text, int start, int length) throws SAXException
comment
in interface LexicalHandler
SAXException
public void endCDATA() throws SAXException
endCDATA
in interface LexicalHandler
SAXException
public void endEntity(String str) throws SAXException
endEntity
in interface LexicalHandler
SAXException
public void startCDATA() throws SAXException
startCDATA
in interface LexicalHandler
SAXException
public void startDTD(String str, String str1, String str2) throws SAXException
startDTD
in interface LexicalHandler
SAXException
public void startEntity(String str) throws SAXException
startEntity
in interface LexicalHandler
SAXException