• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Transforming large XML files with FreeMarker

 
Ranch Hand
Posts: 54
Eclipse IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I put a copy of this post in the "Other Open Source Projects" forum to see if any Freemarker users might notice it there. And perhaps the authors of "Taming Text" might have a comment as well?
reply
    Bookmark Topic Watch Topic
  • New Topic