Interface for an XML filter.

An XML filter is like an XML reader, except that it obtains its events from another XML reader rather than a primary source like an XML document or database. Filters can modify a stream of events as they pass on to the final application.

The XMLFilterImpl helper class provides a convenient base for creating SAX2 filters, by passing on all EntityResolver,  DTDHandler, ContentHandler and ErrorHandler events automatically.

Note: The original documentation comes from SAX 2.0.

SEE: sax::helpers::XMLFilterImpl

Introduced properties

abstract fun parent: nullable XMLReader

sax :: XMLFilter :: parent

Get the parent reader.
abstract fun parent=(parent: nullable XMLReader)

sax :: XMLFilter :: parent=

Set the parent reader.

Redefined properties

redef type SELF: XMLFilter

sax $ XMLFilter :: SELF

Type of this instance, automatically specialized in every class

All properties

fun !=(other: nullable Object): Bool

core :: Object :: !=

Have self and other different values?
fun ==(other: nullable Object): Bool

core :: Object :: ==

Have self and other the same value?
type CLASS: Class[SELF]

core :: Object :: CLASS

The type of the class of self.
type SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
protected fun class_factory(name: String): CLASS

core :: Object :: class_factory

Implementation used by get_class to create the specific class.
fun class_name: String

core :: Object :: class_name

The class name of the object.
abstract fun content_handler: nullable ContentHandler

sax :: XMLReader :: content_handler

Return the current content handler.
abstract fun content_handler=(handler: nullable ContentHandler)

sax :: XMLReader :: content_handler=

Allow an application to register a content event handler.
abstract fun dtd_handler: nullable DTDHandler

sax :: XMLReader :: dtd_handler

Return the current DTD handler.
abstract fun dtd_handler=(handler: nullable DTDHandler)

sax :: XMLReader :: dtd_handler=

Allow an application to register a DTD event handler.
abstract fun entity_resolver: nullable EntityResolver

sax :: XMLReader :: entity_resolver

Return the current entity resolver.
abstract fun entity_resolver=(resolver: nullable EntityResolver)

sax :: XMLReader :: entity_resolver=

Allow an application to register an entity resolver.
abstract fun error_handler: nullable ErrorHandler

sax :: XMLReader :: error_handler

Return the current error handler.
abstract fun error_handler=(handler: nullable ErrorHandler)

sax :: XMLReader :: error_handler=

Allow an application to register an error event handler.
abstract fun feature(name: String): Bool

sax :: XMLReader :: feature

Look up the value of a feature flag.
abstract fun feature=(name: String, value: Bool)

sax :: XMLReader :: feature=

Set the value of a feature flag.
abstract fun feature_readable(name: String): Bool

sax :: XMLReader :: feature_readable

Is the retrieval of the specified feature flag supported given the current context?
abstract fun feature_recognized(name: String): Bool

sax :: XMLReader :: feature_recognized

Is the specified feature flag recognized by this parser?
abstract fun feature_writable(name: String): Bool

sax :: XMLReader :: feature_writable

Is the modification of the specified feature flag supported given the current context?
fun get_class: CLASS

core :: Object :: get_class

The meta-object representing the dynamic type of self.
fun hash: Int

core :: Object :: hash

The hash code of the object.
init init

core :: Object :: init

fun inspect: String

core :: Object :: inspect

Developer readable representation of self.
protected fun inspect_head: String

core :: Object :: inspect_head

Return "CLASSNAME:#OBJECTID".
intern fun is_same_instance(other: nullable Object): Bool

core :: Object :: is_same_instance

Return true if self and other are the same instance (i.e. same identity).
fun is_same_serialized(other: nullable Object): Bool

core :: Object :: is_same_serialized

Is self the same as other in a serialization context?
intern fun is_same_type(other: Object): Bool

core :: Object :: is_same_type

Return true if self and other have the same dynamic type.
intern fun object_id: Int

core :: Object :: object_id

An internal hash code for the object based on its identity.
fun output

core :: Object :: output

Display self on stdout (debug only).
intern fun output_class_name

core :: Object :: output_class_name

Display class name on stdout (debug only).
abstract fun parent: nullable XMLReader

sax :: XMLFilter :: parent

Get the parent reader.
abstract fun parent=(parent: nullable XMLReader)

sax :: XMLFilter :: parent=

Set the parent reader.
abstract fun parse(input: InputSource)

sax :: XMLReader :: parse

Parse an XML document.
abstract fun parse_file(system_id: String)

sax :: XMLReader :: parse_file

Parse an XML document from a system identifier (URI).
abstract fun property(name: String): nullable Object

sax :: XMLReader :: property

Look up the value of a property.
abstract fun property=(name: String, value: nullable Object)

sax :: XMLReader :: property=

Set the value of a property.
abstract fun property_readable(name: String): Bool

sax :: XMLReader :: property_readable

Is the retrieval of the specified property supported given the current context?
abstract fun property_recognized(name: String): Bool

sax :: XMLReader :: property_recognized

Is the specified property recognized by this parser?
abstract fun property_writable(name: String): Bool

sax :: XMLReader :: property_writable

Is the modification of the specified property supported given the current context?
fun serialization_hash: Int

core :: Object :: serialization_hash

Hash value use for serialization
intern fun sys: Sys

core :: Object :: sys

Return the global sys object, the only instance of the Sys class.
abstract fun to_jvalue(env: JniEnv): JValue

core :: Object :: to_jvalue

fun to_s: String

core :: Object :: to_s

User readable representation of self.
package_diagram sax::XMLFilter XMLFilter sax::XMLReader XMLReader sax::XMLFilter->sax::XMLReader core::Object Object sax::XMLReader->core::Object ...core::Object ... ...core::Object->core::Object sax::XMLFilterImpl XMLFilterImpl sax::XMLFilterImpl->sax::XMLFilter saxophonit::SAXEventLogger SAXEventLogger saxophonit::SAXEventLogger->sax::XMLFilterImpl saxophonit::SAXEventLogger... ... saxophonit::SAXEventLogger...->saxophonit::SAXEventLogger

Ancestors

interface Object

core :: Object

The root of the class hierarchy.

Parents

interface XMLReader

sax :: XMLReader

Interface for reading an XML document using callbacks.

Children

class XMLFilterImpl

sax :: XMLFilterImpl

Base class for deriving an XML filter.

Descendants

class SAXEventLogger

saxophonit :: SAXEventLogger

A filter that internally log events it recieves.

Class definitions

sax $ XMLFilter
# Interface for an XML filter.
#
# An XML filter is like an XML reader, except that it obtains its
# events from another XML reader rather than a primary source like
# an XML document or database. Filters can modify a stream of
# events as they pass on to the final application.
#
# The `XMLFilterImpl` helper class provides a convenient base
# for creating SAX2 filters, by passing on all `EntityResolver`,
# `DTDHandler`, `ContentHandler` and `ErrorHandler` events automatically.
#
# Note: The original documentation comes from [SAX 2.0](http://www.saxproject.org).
#
# SEE: `sax::helpers::XMLFilterImpl`
interface XMLFilter super XMLReader

	# Set the parent reader.
	#
	# This method allows the application to link the filter to
	# a parent reader (which may be another filter).
	fun parent=(parent: nullable XMLReader) is abstract

	# Get the parent reader.
	#
	# This method allows the application to query the parent
	# reader (which may be another filter). It is generally a
	# bad idea to perform any operations on the parent reader
	# directly: they should all pass through this filter.
	#
	# Return null if no parent has been set.
	fun parent: nullable XMLReader is abstract
end
lib/sax/xml_filter.nit:16,1--47,3