summaryrefslogtreecommitdiff
path: root/lib/rexml/parsers
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rexml/parsers')
-rw-r--r--lib/rexml/parsers/baseparser.rb4
-rw-r--r--lib/rexml/parsers/sax2parser.rb4
-rw-r--r--lib/rexml/parsers/treeparser.rb3
3 files changed, 6 insertions, 5 deletions
diff --git a/lib/rexml/parsers/baseparser.rb b/lib/rexml/parsers/baseparser.rb
index c57ea58dc7..fecd801d6f 100644
--- a/lib/rexml/parsers/baseparser.rb
+++ b/lib/rexml/parsers/baseparser.rb
@@ -146,8 +146,6 @@ module REXML
# Returns true if there are no more events
def empty?
- #STDERR.puts "@source.empty? = #{@source.empty?}"
- #STDERR.puts "@stack.empty? = #{@stack.empty?}"
return (@source.empty? and @stack.empty?)
end
@@ -365,8 +363,6 @@ module REXML
else
md = @source.match( TEXT_PATTERN, true )
if md[0].length == 0
- puts "EMPTY = #{empty?}"
- puts "BUFFER = \"#{@source.buffer}\""
@source.match( /(\s+)/, true )
end
#STDERR.puts "GOT #{md[1].inspect}" unless md[0].length == 0
diff --git a/lib/rexml/parsers/sax2parser.rb b/lib/rexml/parsers/sax2parser.rb
index 61a216cec1..6c7fbe000a 100644
--- a/lib/rexml/parsers/sax2parser.rb
+++ b/lib/rexml/parsers/sax2parser.rb
@@ -16,6 +16,10 @@ module REXML
@tag_stack = []
@entities = {}
end
+
+ def source
+ @parser.source
+ end
def add_listener( listener )
@parser.add_listener( listener )
diff --git a/lib/rexml/parsers/treeparser.rb b/lib/rexml/parsers/treeparser.rb
index 500a53f426..a53fa41925 100644
--- a/lib/rexml/parsers/treeparser.rb
+++ b/lib/rexml/parsers/treeparser.rb
@@ -23,7 +23,8 @@ module REXML
case event[0]
when :end_document
unless tag_stack.empty?
- raise ParseException.new("No close tag for #{tag_stack.inspect}")
+ #raise ParseException.new("No close tag for #{tag_stack.inspect}")
+ raise ParseException.new("No close tag for #{@build_context.xpath}")
end
return
when :start_element