class RSS::XMLScanParser

Public Class Methods

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

Private Instance Methods

_parse() click to toggle source
# File rss-0.2.9/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