diff options
| author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-17 00:51:31 +0000 |
|---|---|---|
| committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-17 00:51:31 +0000 |
| commit | 0667cd0b6378e413c28277a43442b6554c7b53e1 (patch) | |
| tree | e8298605f2f0e29f2ec2befeda793b46194e4ddd /lib/rss/rexmlparser.rb | |
| parent | 9dc733281997c4c6668dfd02561c0d9621988759 (diff) | |
| download | ruby-0667cd0b6378e413c28277a43442b6554c7b53e1.tar.gz ruby-0667cd0b6378e413c28277a43442b6554c7b53e1.tar.xz ruby-0667cd0b6378e413c28277a43442b6554c7b53e1.zip | |
* lib/rss, test/rss: backported from trunk. (2005-11-16 - now)
* lib/rss/parser.rb: added entity handling type predicate.
* lib/rss/rexmlparser.rb: ditto.
* lib/rss/xmlparser.rb: ditto.
* lib/rss/xmlscanner.rb: ditto.
* lib/rss/xmlscanner.rb: more robust entity handling.
* test/rss/test_parser.rb: added an entity handling test.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@10295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rss/rexmlparser.rb')
| -rw-r--r-- | lib/rss/rexmlparser.rb | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/rss/rexmlparser.rb b/lib/rss/rexmlparser.rb index 73e352a73..4dabf5919 100644 --- a/lib/rss/rexmlparser.rb +++ b/lib/rss/rexmlparser.rb @@ -10,12 +10,13 @@ module RSS class REXMLParser < BaseParser - private - - def listener - REXMLListener + class << self + def listener + REXMLListener + end end - + + private def _parse begin REXML::Document.parse_stream(@rss, @listener) @@ -35,6 +36,12 @@ module RSS include REXML::StreamListener include ListenerMixin + class << self + def raise_for_undefined_entity? + false + end + end + def xmldecl(version, encoding, standalone) super(version, encoding, standalone == "yes") # Encoding is converted to UTF-8 when REXML parse XML. |
