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 `klyn import klyn.io.xml.sax

handler = DefaultHandler2() handler.startCDATA() handler.endCDATA()

Properties inherited 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<Char>, 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 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 resolveEntity
resolveEntity(publicId as String, systemId as String) as InputSource throws SAXException, IOException:
Resolves an external entity using SAX1 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.
Methods inherited from DefaultHandler: characters, declaration, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
Methods inherited from LexicalHandler: comment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity
Methods inherited from DeclHandler: attributeDecl, elementDecl, externalEntityDecl, internalEntityDecl
Methods inherited from EntityResolver2: getExternalSubset, resolveEntity
Methods inherited from Object: fromJson, toDict, toJson, toString, toXml
Methods inherited from EntityResolver: resolveEntity
Methods inherited from DTDHandler: notationDecl, unparsedEntityDecl
Methods inherited from ContentHandler: characters, declaration, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping
Methods inherited from ErrorHandler: error, fatalError, warning