diff options
| author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-23 13:35:11 +0000 |
|---|---|---|
| committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-23 13:35:11 +0000 |
| commit | b26674f5a74d175d2be0267686b9c42845a1fc42 (patch) | |
| tree | 71e0eec4b90f0f355f3dc4f83f774736c8b3191a /lib/rss/rexmlparser.rb | |
| parent | 0ad927530f15736644a7d309006abb9dff8a420b (diff) | |
| download | ruby-b26674f5a74d175d2be0267686b9c42845a1fc42.tar.gz ruby-b26674f5a74d175d2be0267686b9c42845a1fc42.tar.xz ruby-b26674f5a74d175d2be0267686b9c42845a1fc42.zip | |
* 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/trunk@9602 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. |
