Class
Jabber::Protocol::REXMLJabberParser
In: jabber4r/protocol.rb
Parent: Object

The REXMLJabberParser uses REXML to parse the incoming XML stream of the Jabber protocol and fires ParsedXMLElements at the Connection instance.

Methods

cdata, new, parse, tag_end, tag_start, text,
Attributes

 [R]  :started

status if the parser is started

Included modules

REXML::StreamListener
Public Class methods
new(stream, listener) src

Constructs a parser for the supplied stream (socket input)

stream:[IO] Socket input stream
listener:[Object.receive(ParsedXMLElement)] The listener (usually a Jabber::Protocol::Connection instance
Public Instance methods
tag_start(name, attrs) src

Callback for REXML::Document.parse_stream when a start tag is encountered

name:[String] The tag name <name>
attrs:[Array] The attribute array...attrs = [["key","value"], ["key2", "value2"]]
tag_end(name) src

Callback for REXML::Document.parse_stream when an end tag is encountered

name:[String] the tag name
text(text) src

Callback for REXML::Document.parse_stream when text is encountered

text:[String] The text (<tag>text</tag>)
cdata(content) src

Callback for REXML::Document.parse_stream when cdata is encountered

content:[String] The CData content
parse() src

Begins parsing the XML stream and does not return until the stream closes.