I need to transform XML files into various other formats such as CSV, HTML, ODT etc.. In a previous project I did this using XSLT and although I got it working it was a bit of a slog. Getting certain things to work like escaping characters, managing white-space and more was just so awkward. I am a big fan of FreeMarker and I know it can work with XML files so this would be ideal. My concern is whether it can handle large XML files efficiently. Looking at the API and source it looks like it loads the entire XML file into memory instead of streaming it. The XML source files could be a couple of hundred MBs and I might need to process a few at a time. Does anyone have any experience of using FreeMarker with such large files. What was it's memory usage like?