News for hackers. Stuff that matters.
Re:Processing documents with Clojure transducers by kenko on Tuesday June 02, 2015 @02:14PM (#9647815)
"Zippers are complicated animals to work with, take quite a lot of setting up and require that the document fits in memory."

"xml/parse parses the file into a tree structure like this"

So aren't we fitting the whole document into memory anyway?

Re:Processing documents with Clojure transducers by loevborg on Wednesday June 03, 2015 @03:57AM (#9651171)
If I'm reading the source correctly, `clojure.xml/parse` consumes the entire XML document. However, its successor `clojure.data.xml/parse` is lazy. The techniques described in the blog post should work with a lazy sequence (lazy tree), so you can stream data in that doesn't fit into memory. See http://stackoverflow.com/a/11215430/239678 and http://clojure.github.io/data.xml/#clojure.data.xml/parse.