Re: xml-zip

2011-12-13 Thread Linus Ericsson
(: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

Re: xml-zip

2011-12-13 Thread Tom Faulhaber
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

xml-zip

2011-12-12 Thread Linus Ericsson
=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

Re: xml-zip

2011-12-12 Thread Tom Faulhaber
/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