Class RSS::XMLScanListener
In: rss/xmlscanner.rb
Parent: BaseListener

Methods

Included Modules

XMLScan::Visitor ListenerMixin

Constants

ENTITIES = { 'lt' => '<', 'gt' => '>', 'amp' => '&', 'quot' => '"', 'apos' => '\''

External Aliases

instruction -> on_pi
text -> on_chardata
text -> on_cdata

Public Instance methods

[Source]

# File rss/xmlscanner.rb, line 95
    def on_attr_charref(code)
      @current_attr << [code].pack('U')
    end
on_attr_charref_hex(code)

Alias for on_attr_charref

[Source]

# File rss/xmlscanner.rb, line 91
    def on_attr_entityref(ref)
      @current_attr << entity(ref)
    end

[Source]

# File rss/xmlscanner.rb, line 87
    def on_attr_value(str)
      @current_attr << str
    end

[Source]

# File rss/xmlscanner.rb, line 83
    def on_attribute(name)
      @attrs[name] = @current_attr = ''
    end

[Source]

# File rss/xmlscanner.rb, line 73
    def on_charref(code)
      text([code].pack('U'))
    end
on_charref_hex(code)

Alias for on_charref

[Source]

# File rss/xmlscanner.rb, line 69
    def on_entityref(ref)
      text(entity(ref))
    end

[Source]

# File rss/xmlscanner.rb, line 65
    def on_etag(name)
      tag_end(name)
    end

[Source]

# File rss/xmlscanner.rb, line 79
    def on_stag(name)
      @attrs = {}
    end

[Source]

# File rss/xmlscanner.rb, line 101
    def on_stag_end(name)
      tag_start(name, @attrs)
    end

[Source]

# File rss/xmlscanner.rb, line 105
    def on_stag_end_empty(name)
      tag_start(name, @attrs)
      tag_end(name)
    end

[Source]

# File rss/xmlscanner.rb, line 49
    def on_xmldecl_encoding(str)
      @encoding = str
    end

[Source]

# File rss/xmlscanner.rb, line 57
    def on_xmldecl_end
      xmldecl(@version, @encoding, @standalone == "yes")
    end

[Source]

# File rss/xmlscanner.rb, line 53
    def on_xmldecl_standalone(str)
      @standalone = str
    end

[Source]

# File rss/xmlscanner.rb, line 45
    def on_xmldecl_version(str)
      @version = str
    end

[Validate]

ruby-doc.org is a community service provided by Happy Camper Studios, a Phoenix, Arizona, Ruby application development company.

Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.

For more information on the Ruby programming language, visit ruby-lang.org.

Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.