module StreamListener


A template for stream parser listeners. Note that the declarations (attlistdecl, elementdecl, etc) are trivially processed; REXML doesn't yet handle doctype entity declarations, so you have to parse them out yourself.

Methods


Methods

attlistdecl


If a doctype includes an ATTLIST declaration, it will cause this method to be called. The content is the declaration itself, unparsed. EG, <!ATTLIST el attr CDATA #REQUIRED> will come to this method as "el attr CDATA #REQUIRED". This is the same for all of the .*decl methods.

cdata


Called when <![CDATA[ ... ]]> is encountered in a document.

comment


Called when a comment is encountered.

doctype


Handles a doctype declaration. Any attributes of the doctype which are not supplied will be nil. # EG, <!DOCTYPE me PUBLIC "foo" "bar">

elementdecl


<!ELEMENT ...>

entity


Called when %foo; is encountered in a doctype declaration.

entitydecl


<!ENTITY ...>

instruction


Called when an instruction is encountered. EG: <?xsl sheet='foo'?>

notationdecl


<!NOTATION ...>

tag_end


Called when the end tag is reached. In the case of <tag/>, tag_end will be called immidiately after tag_start

tag_start


Called when a tag is encountered.

text


Called when text is encountered in the document

xmldecl


Called when an XML PI is encountered in the document. EG: <?xml version="1.0" encoding="utf"?>