Groovy XMLSlurper issue
问题 I want to parse with XmlSlurper a HTML document which I read using HTTPBuilder. Initialy I tried to do it this way: def response = http.get(path: "index.php", contentType: TEXT) def slurper = new XmlSlurper() def xml = slurper.parse(response) But it produces an exception: java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd I found a workaround to provide cached DTD files. I found a simple implementation of class which