Rexle is incorrectly parsing XML containing a comment

To reproduce this bug I am using the latest version of Rexle from the development environment. The code declaration is as follows:


require 'requestor'
eval Requestor.read('http://rorbuilder.info/r/ruby'){|x| x.require 'rexle'}

E

xpected

doc2 = Rexle.new("<a><!--<b>123</b>--><b2>456</b2></a>")
doc2.xml
#=> "<?xml version='1.0' encoding='UTF-8'?>\n<a><!--<b>123</b>--><b2>456</b2></a>"

A

ctual

doc2 = Rexle.new("<a><!--<b>123</b>--><b2>456</b2></a>")
doc2.xml
#=> "<?xml version='1.0' encoding='UTF-8'?>\n<a><!--<b>123<b2>456</b2></!--<b></a>"

Note: If I remove the comment it works as expected.

Tags:
Source:
0927hrs.txt
Published:
14-11-2011 09:27