title: How to parse non-well formatted HTML with XmlSlurper
body: <p>I'm trying to parse a non-well-formatted HTML page with XmlSlurper, <a href="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/luna/SR1a/eclipse-jee-luna-SR1a-linux-gtk-x86_64.tar.gz" rel="nofollow">the Eclipse download site</a> The <a href="http://validator.w3.org/check?uri=http%3A%2F%2Fwww.eclipse.org%2Fdownloads%2Fdownload.php%3Ffile%3D%2Ftechnology%2Fepp%2Fdownloads%2Frelease%2Fluna%2FSR1a%2Feclipse-jee-luna-SR1a-linux-gtk-x86_64.tar.gz&amp;charset=%28detect%20automatically%29&amp;doctype=Inline&amp;group=0" rel="nofollow">W3C validator</a> shows several errors in the page.</p>
  
  <p>I tried the fault-tolerant parser from <a href="http://desmontandojava.blogspot.de/2012/06/scraping-with-groovy-i-xmlslurper.html" rel="nofollow">this</a> post</p>
  
  <pre><code>@Grab(group='net.sourceforge.nekohtml', module='nekohtml', version='1.9.14')
  import org.cyberneko.html.parsers.SAXParser 
  import groovy.util.XmlSlurper
  
  // Getting the xhtml page thanks to Neko SAX parser 
  def mirrors = new XmlSlurper(new SAXParser()).parse("http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/luna/SR1a/eclipse-jee-luna-SR1a-linux-gtk-x86_64.tar.gz")    
  
  mirrors.'**'
  </code></pre>
  
  <p>Unfortunately, it looks like not all content is parsed into the XML object. The faulty subtrees are simply ignored.</p>
  
  <p>E.g. <code>page.depthFirst().find { it.text() == 'North America'}</code> returns <code>null</code> instead of the H4 element in the page.</p>
  
  <p>Is there some robust way to parse any HTML content in groovy?</p>