DefaultHandler2
classin packageklyn.io.xml.sax
public class DefaultHandler2 extends DefaultHandler implements LexicalHandler, DeclHandler, EntityResolver2
└ DefaultHandler2
All Implemented Interfaces: LexicalHandler, DeclHandler, EntityResolver2

No-op SAX handler covering the SAX extension callbacks.

This helper extends DefaultHandler with lexical, declaration and SAX2 entity resolver callbacks. Applications can subclass it when they need DTD or CDATA/comment notifications.

Example
import klyn.io.xml.sax

handler = DefaultHandler2()
handler.startCDATA()
handler.endCDATA()
Inherited Properties
propertyInherited Properties from Object: type
Constructors
Modifier and Type Member Description
public DefaultHandler2 Creates a no-op extension handler.
Methods
Modifier and Type Member Description
public attributeDecl
attributeDecl(elementName as String, attributeName as String, type as String, mode as String, value as String) as Void throws SAXException
Receives an attribute declaration from the DTD.
public comment
comment(ch as Array<CodeUnit>, start as Int, length as Int) as Void throws SAXException
Receives an XML comment.
public override declaration
declaration(version as String, encoding as String, standalone as String) as Void throws SAXException
Receives the XML declaration pseudo-attributes.
public elementDecl
elementDecl(name as String, model as String) as Void throws SAXException
Receives an element declaration from the DTD.
public endCDATA
endCDATA() as Void throws SAXException
Receives the end of a CDATA section.
public endDTD
endDTD() as Void throws SAXException
Receives the end of a DTD declaration.
public endEntity
endEntity(name as String) as Void throws SAXException
Receives the end of an entity.
public externalEntityDecl
externalEntityDecl(name as String, publicId as String, systemId as String) as Void throws SAXException
Receives an external entity declaration.
public getExternalSubset
getExternalSubset(name as String, baseURI as String) as InputSource throws SAXException, IOException
Provides an external subset.
public internalEntityDecl
internalEntityDecl(name as String, value as String) as Void throws SAXException
Receives an internal entity declaration.
public override resolveEntity
resolveEntity(publicId as String, systemId as String) as InputSource throws SAXException, IOException
Resolves an external entity using SAX1 metadata.
public resolveEntity
resolveEntity(name as String, publicId as String, baseURI as String, systemId as String) as InputSource throws SAXException, IOException
Resolves an external entity using SAX2 metadata.
public startCDATA
startCDATA() as Void throws SAXException
Receives the beginning of a CDATA section.
public startDTD
startDTD(name as String, publicId as String, systemId as String) as Void throws SAXException
Receives the beginning of a DTD declaration.
public startEntity
startEntity(name as String) as Void throws SAXException
Receives the beginning of an entity.
Inherited Methods
methodInherited Methods from DefaultHandler: characters, declaration, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
methodInherited Methods from Object: deepCopy, fromJson, hash, toDict, toJson, toMap, toString, toXml