Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
1.6.4, 1.8.2, 1.8.3
-
None
-
OSX 10.6, OSX 10.7, Ubuntu 10.04
Description
When parsing a XHTML document with a DOCTYPE declaration, the XMLSlurper parses for about two minutes. I reproduced this on several different groovy versions on OS X and Linux, but not using the groovy web console on appspot.com. This has also been encountered by some on the grails user mailing list earlier this year: http://grails.1312388.n4.nabble.com/XMLSlurper-really-slow-reading-parsing-html-xml-file-td3433305.html
Minimal example to trigger this:
new XmlSlurper().parseText('''<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de"><head><title>slurp</title></head><body /></html>''')