class RSS::XMLScanParser

Public Class Methods

listener() click to toggle source
# File lib/rss/xmlscanner.rb, line 10
def listener
  XMLScanListener
end

Private Instance Methods

_parse() click to toggle source
# File lib/rss/xmlscanner.rb, line 16
def _parse
  begin
    if @rss.is_a?(String)
      input = StringIO.new(@rss)
    else
      input = @rss
    end
    scanner = XMLScan::XMLScanner.new(@listener)
    scanner.parse(input)
  rescue XMLScan::Error => e
    lineno = e.lineno || scanner.lineno || input.lineno
    raise NotWellFormedError.new(lineno){e.message}
  end
end