(:require [clojure.zip :as zip]
[clojure.data.zip :as zf]
[clojure.xml :as xml])
(:use clojure.data.zip.xml))
(def mz (zip/xml-zip (xml/parse dataabove.xml)))
(defn get-all-dimensions []
(doseq [id (xml- mz zf/descendants (attr= :id 2) zf/children :e
(attr :id
the
autodoc).
Using that, the xpathy thing you're looking for is something like
this:
(ns play.xml-example
(:require [clojure.zip :as zip]
[clojure.data.zip :as zf]
[clojure.xml :as xml])
(:use clojure.data.zip.xml))
(def mz (zip/xml-zip (xml/parse dataabove.xml
=not-intresting/d
/a
My solution so far would be something like
(def mz (zip/xml-zip (xml/parse dataabove.xml)))
(defn get-all-dimensions []
(filter #(and (= 2 (:id %)) (= :e (:tag %))) (zip/children mz
but I'm looking for some descending solution
(- mz
(zip/down a)
(zip/down c :where
/data.zip for the
autodoc).
Using that, the xpathy thing you're looking for is something like
this:
(ns play.xml-example
(:require [clojure.zip :as zip]
[clojure.data.zip :as zf]
[clojure.xml :as xml])
(:use clojure.data.zip.xml))
(def mz (zip/xml-zip (xml/parse