title: Parsing (very) large XML files with XmlSlurper
body: <p>I am kind of new to Groovy and I am trying to read a (quite) large XML file (more than 1Gb) using XmlSlurper, which is supposed to work wonders with large files due to the fact that it doesn't build the whole DOM in memory.</p>
  
  <p>Nevertheless I keep getting "OutOfMemoryError : Java heap space" which makes me think that there obviously is something that I'm doing wrong. I tried increasing the Xmx setting but I would rather solve the problem since I may have to deal with even bigger files afterwards.</p>
  
  <p>Here is the line of code I used:</p>
  
  <pre><code>def posts = new XmlSlurper().parse(new File("posts.xml"))
  </code></pre>
  
  <p>Any hint on what's wrong ?</p>
  
  <p>Thanks in advance,</p>
  
  <p>Jérémie.</p>