summaryrefslogtreecommitdiff
path: root/lib/rss/rexmlparser.rb
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-31 16:10:53 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-31 16:10:53 +0000
commit976226b5de303ed852744c0291c280d1e5fd538f (patch)
tree088915bab077d20c8928cccfca6fb0eb2cf36347 /lib/rss/rexmlparser.rb
parent35d62eb6a5f6521ed9297d99cb723a2efc85eb19 (diff)
* lib/rss/parser.rb (RSS::Parser): added @@default_parser. Used
XML parser became selectable. * test/rss/test_parser.rb: added tests for RSS::Parser.default_parser. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rss/rexmlparser.rb')
-rw-r--r--lib/rss/rexmlparser.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/rss/rexmlparser.rb b/lib/rss/rexmlparser.rb
index b3d801597a..541ff82fc3 100644
--- a/lib/rss/rexmlparser.rb
+++ b/lib/rss/rexmlparser.rb
@@ -8,9 +8,14 @@ end
module RSS
- class Parser < BaseParser
+ class REXMLParser < BaseParser
private
+
+ def listener
+ REXMLListener
+ end
+
def _parse
begin
REXML::Document.parse_stream(@rss, @listener)
@@ -25,11 +30,10 @@ module RSS
end
- class Listener < BaseListener
+ class REXMLListener < BaseListener
include REXML::StreamListener
include ListenerMixin
-
def xmldecl(version, encoding, standalone)
super