groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Myers <>
Subject org.xml.sax.SAXParseException with XmlSlurper
Date Thu, 19 Nov 2015 01:47:33 GMT

For a while I've been using groovy to parse some badly formed HTML via 
XmlSlurper in conjunction with TagSoup, something like this:

def slurper = new XmlSlurper(new org.ccil.cowan.tagsoup.Parser())
def html = slurper.parseText(htmlText)

It works fine when I unit test it with Gradle, but I've tried to deploy 
this inside another webapp which runs on Lucee ( but I 
think I'm running into some kind of "Jar hell".  When I try to parse the 
htmlText, I get an error like this which makes me think it's not using 
the tagsoup Parser

The exception is: org.xml.sax.SAXParseException, with a stracktrace 
starting like this:

The element type "meta" must be terminated by the matching end-tag 
"</meta>". at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown 
Source):-1 at 
Source):-1 at groovy.util.XmlSlurper.parse( at 
groovy.util.XmlSlurper.parse( at 
groovy.util.XmlSlurper.parseText( at 
groovy.util.XmlSlurper$ Source):-1 at 



I'm a bit lost as to what to look for to debug this.  Has anyone come 
across anything similar?


View raw message