Hi,

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 (http://lucee.org/) 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 org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source):-1 at groovy.util.XmlSlurper.parse(XmlSlurper.java:205):205 at groovy.util.XmlSlurper.parse(XmlSlurper.java:258):258 at groovy.util.XmlSlurper.parseText(XmlSlurper.java:284):284 at groovy.util.XmlSlurper$parseText.call(Unknown Source):-1 at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45):45 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108):108 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116):116 at

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

Thanks!
Andrew.

Reply via email to