clojure-xml/parse 返回一个 xml 文件的映射。
(ns xml-lib.core
^{:author "Charles M. Norton",
:doc "xml-lib is an xml parsing library built on clojure-xml.
Created on June 26, 2012"}
(:require [clojure.string :as cstr])
(:require [util.core :as utl])
(:require [clojure.xml :as cjxml]))
(defn ret-xml-data
"Returns a map of the supplied xml file."
[xml-fnam]
(let [test-file-nam (utl/open xml-fnam)]
(cjxml/parse xml-fnam))
返回的地图是惰性的,还是应该将解析调用传递给惰性序列函数?
谢谢。
(ret-xml-data "test.xml")
返回(结果被截断)。
{:tag :TamperExport, :attrs {:xmlns "http://