From: "studnev (Aleksey Studnev)" Date: 2012-04-17T06:39:14+09:00 Subject: [ruby-core:44397] [ruby-trunk - Bug #6307][Open] REXML parser does not parse valid XML (The 'xml' prefix must not be bound to any other namespace) Issue #6307 has been reported by studnev (Aleksey Studnev). ---------------------------------------- Bug #6307: REXML parser does not parse valid XML (The 'xml' prefix must not be bound to any other namespace) https://bugs.ruby-lang.org/issues/6307 Author: studnev (Aleksey Studnev) Status: Open Priority: Normal Assignee: Category: Target version: ruby -v: ruby 1.9.2p290 (2011-07-09) [i386-mingw32] Attached is an example file which is not parsed by REXML parser, generating an error: The 'xml' prefix must not be bound to any other namespace (http://www.w3.org/TR/REC-xml-names/#ns-decl) The problem is in these following lines: attrs.each { |a,b,c,d,e| if b == "xmlns" if c == "xml" if d != "http://www.w3.org/XML/1998/namespace" msg = "The 'xml' prefix must not be bound to any other namespace "+ "(http://www.w3.org/TR/REC-xml-names/#ns-decl)" raise REXML::ParseException.new( msg, @source, self ) There is a description of this problem also in: https://rails.lighthouseapp.com/projects/8994/tickets/3701-bug-in-baseparserrb -- http://bugs.ruby-lang.org/