Project

General

Profile

Bug #8731 » sax2parser_decl_error.rb

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

 
require 'rexml/parsers/sax2parser'
require 'rexml/sax2listener'

xml = <<EOS
<!DOCTYPE root [
<!ENTITY % YN '"Yes"'>
<!NOTATION x SYSTEM "URIx">
]>
<root />
EOS

class Listener
include REXML::SAX2Listener
end

parser = REXML::Parsers::SAX2Parser.new(xml)
parser.listen(Listener.new)
parser.parse
(1-1/4)