SAXParser
class in package klyn.io.xml.sax

    public class SAXParser extends Object implements XMLReader, Parser:

Object
└ SAXParser
All Implemented Interfaces: XMLReader, Parser

Pure Klyn non-validating SAX parser.

The parser implements the SAX2 `XMLReader` API and the deprecated SAX1 `Parser` API. It reports document, element, Namespace, character, processing instruction, CDATA, comment and DTD lexical events without using native code.

This implementation focuses on well-formed XML parsing. It does not validate documents and does not read external entities by default.

@example ```klyn import klyn.io.xml.sax import org.xml.sax

parser = SAXParser() parser.setContentHandler(DefaultHandler()) parser.parse(InputSource("file:/tmp/doc.xml"))

Properties inherited from Object: type
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | SAXParser `SAXParser():` | Creates a non-validating SAX parser.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public | getContentHandler `getContentHandler() as ContentHandler:` | Returns the SAX2 content handler.
public | getDTDHandler `getDTDHandler() as DTDHandler:` | Returns the DTD handler.
public | getEntityResolver `getEntityResolver() as EntityResolver:` | Returns the entity resolver.
public | getErrorHandler `getErrorHandler() as ErrorHandler:` | Returns the error handler.
public | getFeature `getFeature(name as String) as Boolean throws SAXNotRecognizedException, SAXNotSupportedException:` | Returns the current feature value.
public | getProperty `getProperty(name as String) as Object throws SAXNotRecognizedException, SAXNotSupportedException:` | Returns a SAX property value.
public | parse `parse(input as InputSource) as Void throws IOException, SAXException:` | Parses XML from an input source.
public | parse `parse(input as InputSource, handler as ContentHandler) as Void throws IOException, SAXException:` | Parses an input source with a content handler.
public | parse `parse(input as InputSource, handler as DefaultHandler) as Void throws IOException, SAXException:` | Parses an input source with a `DefaultHandler`.
public | parse `parse(systemId as String) as Void throws IOException, SAXException:` | Parses XML from a system identifier.
public | parse `parse(systemId as String, handler as ContentHandler) as Void throws IOException, SAXException:` | Parses a system identifier with a content handler.
public | parse `parse(systemId as String, handler as DefaultHandler) as Void throws IOException, SAXException:` | Parses a system identifier with a `DefaultHandler`.
public | setContentHandler `setContentHandler(handler as ContentHandler) as Void:` | Registers the SAX2 content handler.
public | setDTDHandler `setDTDHandler(handler as DTDHandler) as Void:` | Registers the DTD handler.
public | setDocumentHandler `setDocumentHandler(handler as DocumentHandler) as Void:` | Registers the SAX1 document handler.
public | setEntityResolver `setEntityResolver(resolver as EntityResolver) as Void:` | Registers the entity resolver.
public | setErrorHandler `setErrorHandler(handler as ErrorHandler) as Void:` | Registers the error handler.
public | setFeature `setFeature(name as String, value as Boolean) as Void throws SAXNotRecognizedException, SAXNotSupportedException:` | Sets a feature value.
public | setLocale `setLocale(locale as Locale) as Void throws SAXException:` | Accepts a preferred diagnostics locale.
public | setProperty `setProperty(name as String, value as Object) as Void throws SAXNotRecognizedException, SAXNotSupportedException:` | Sets a SAX property value.

Methods inherited from Object: fromJson, toDict, toJson, toString, toXml
Methods inherited from XMLReader: getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getProperty, parse, parse, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setProperty
Methods inherited from Parser: parse, parse, setDocumentHandler, setLocale