Class: RSS::XMLScanListener

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

### Methods

on_attr_charref on_attr_charref_hex on_attr_entityref on_attr_value on_attribute on_charref on_charref_hex on_entityref on_etag on_stag on_stag_end on_stag_end_empty on_xmldecl_encoding on_xmldecl_end on_xmldecl_standalone on_xmldecl_version

### 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

on_attr_charref(code)

[Source]

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

on_attr_charref_hex(code)

Alias for on_attr_charref

on_attr_entityref(ref)

[Source]

    # File rss/xmlscanner.rb, line 81
        def on_attr_entityref(ref)
          @current_attr << ENTITIES[ref]
        end

on_attr_value(str)

[Source]

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

on_attribute(name)

[Source]

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

on_charref(code)

[Source]

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

on_charref_hex(code)

Alias for on_charref

on_entityref(ref)

[Source]

    # File rss/xmlscanner.rb, line 59
        def on_entityref(ref)
          text(ENTITIES[ref])
        end

on_etag(name)

[Source]

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

on_stag(name)

[Source]

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

on_stag_end(name)

[Source]

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

on_stag_end_empty(name)

[Source]

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

on_xmldecl_encoding(str)

[Source]

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

on_xmldecl_end()

[Source]

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

on_xmldecl_standalone(str)

[Source]

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

on_xmldecl_version(str)

[Source]

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

[Validate]