Ответ 1
data.xml
docs говорит, что создает ленивое дерево документа: parse. Я проверил локально, и это кажется правдой:
; Load libs
(require '[clojure.data.xml :as xml])
(require '[clojure.java.io :as io])
; standard.xml is 100MB xml file from here http://www.xml-benchmark.org/downloads.html
(def xml-tree (xml/parse (io/reader "standard.xml")))
(:tag xml-tree) => :site
(def child (first (:content xml-tree)))
(:tag child) => :regions
(dorun (:content xml-tree)) => REPL hangs for ~30 seconds on my computer because it tries to parse whole file