On Jan 23, 2:29 am, David Cabana <drcab...@gmail.com> wrote:
> What I'd like to get from 'tickets' is something like ( ["Alice"
> ["foo"]]  ["Bob" ["bar" "baz"]]), that is, output that ties incidents
> to customers. So far it has eluded me.

"xml->" just returns a sequence of matches. If you want nested
matches, you'll need to put another loop in. Perhaps something like:

(defn tickets [xml]
  (for [ticket (zf/xml-> xml :ticket)]
    [(zf/xml1-> ticket :customer zf/text)
     (zf/xml-> ticket :item zf/text)]))

That should work, but I haven't had the opportunity to test it, so
forgive me if I'm wrong! :)

- James

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to