Project

General

Profile

Bug #8731 ยป sax2parser_decl_error.rb

ohai (Ippei Obayashi), 08/04/2013 06:01 PM

 
1
require 'rexml/parsers/sax2parser'
2
require 'rexml/sax2listener'
3

    
4
xml = <<EOS
5
<!DOCTYPE root [
6
  <!ENTITY % YN '"Yes"'>
7
  <!NOTATION x SYSTEM "URIx">
8
]>
9
<root />
10
EOS
11

    
12
class Listener
13
  include REXML::SAX2Listener
14
end
15

    
16
parser = REXML::Parsers::SAX2Parser.new(xml)
17
parser.listen(Listener.new)
18
parser.parse