title: How to parse a huge XML file in Liferay with Java?
body: <p>I have always been told that when parsing huge XML files, the memory-heavy DOM parsers should be avoid in favour of the lightweight SAX parsers.</p>
  
  <p>I want to parse a huge XML file in Liferay. The file is just a list of items, and I need to process the items one-by-one independently, so it is a perfect use case for SAX.</p>
  
  <p>I have found Liferay's <a href="https://docs.liferay.com/portal/7.0/javadocs/portal-kernel/com/liferay/portal/kernel/xml/SAXReaderUtil.html" rel="nofollow noreferrer">SAXReaderUtil</a>, but despite the "SAX" in its name, it looks suspiciously like a DOM parser. It has no events, and it seems to be all about returning a Document and selecting nodes with XPath. Am I mistaken?</p>
  
  <p>What is the correct way to parse a huge XML file when developing a Liferay module?</p>