-
-
Save winmillwill/ace2ae2f2fa2eeb5d50d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns xml.core | |
(:require [clojure.data.xml :as xml] | |
[clojure.java.io :as io] | |
)) | |
(defn root | |
"Get the root element." | |
[input] | |
(-> input io/resource io/input-stream xml/parse)) | |
(defn tables | |
"Get the tables." | |
([root n] | |
(cons | |
(-> root :content (nth n) :content first) | |
(lazy-seq (tables root (inc n)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment