Ruby REXML::Parsers::BaseParser Functions

EditRocket provides the following information on REXML::Parsers::BaseParser functions in the Ruby source code builder.

add_listener( listener ) -

empty?() - Returns true if there are no more events

entity( reference, entities ) -

has_next?() - Returns true if there are more events. Synonymous with !empty?

new( source ) -

normalize( input, entities=nil, entity_filter=nil ) - Escapes all possible entities

peek(depth=0) - Peek at the depth event in the stack. The first element on the stack is at depth 0. If depth is -1, will parse to the end of the input stream and return the last event, which is always :end_document. Be aware that this causes the stream to be parsed up to the depth event, so you can effectively pre-parse the entire document (pull the entire thing into memory) using this method.

position() -

pull() - Returns the next event. This is a PullEvent object.

stream=( source ) -

unnormalize( string, entities=nil, filter=nil ) - Unescapes all possible entities

unshift(token) - Push an event back on the head of the stream. This method has (theoretically) infinite depth.