Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
1.0
-
None
-
None
-
Groovy: 1.0
JVM:1.5.0_06-b05
Description
Here is a simple script that parses a simple web page :
def xmlSlurper = new XmlSlurper(new org.cyberneko.html.parsers.SAXParser()) def htmlNode = xmlSlurper.parseText("<html><body><hr/><hr/></body></html>"); def bodyNode = htmlNode.body println bodyNode.children().size()
When executed, it prints "0".
The body node contains two children nodes, so it should print "2".
It prints "2" if you use the default parser (by removing the slurper's constructor argument in the script above).
Notes:
- It is not a duplicate of bug #
GROOVY-1763, as here it works with the default parser. - There is no workaround, I will have to parse non-valid web pages, so I must use Cyberneko and not the default parser.