store/[org.clojure/clojure "1.8.0"] clj::clojure.core/xml-seq

Official Documentation

Add notes
Arities
==================================================
   [root]

Docstring
==================================================
  A tree seq on the xml elements as per xml/parse

Source

(defn xml-seq
  "A tree seq on the xml elements as per xml/parse"
  {:added "1.0"
   :static true}
  [root]
    (tree-seq
     (complement string?)
     (comp seq :content)
     root))

Example 1

Edit
(require '[clojure.xml :refer [parse]])
;; => nil

;; clojure.xml/parse requires string to be ByteArrayInputStream
(let [xml-text "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
                      <foo key=\"val\">1<bar>2</bar>3</foo>"]
  (let [input (java.io.ByteArrayInputStream. 
               (.getBytes xml-text))]
    (let [root (parse input)]
      (xml-seq root))))

;; => ({:tag :foo,                                                   
;;      :attrs {:key "val"},                                         
;;      :content ("1" {:tag :bar, :attrs {}, :content ("2")} "3")}   
;;     "1"                                                           
;;     {:tag :bar, :attrs {}, :content ("2")}                        
;;     "2"                                                           
;;     "3")

Uses on crossclj