James, That worked beautifully. I knew it had to be simple, but I was drawing a total blank. Thank you, David.
On Fri, Jan 22, 2010 at 9:53 PM, James Reeves <[email protected]> wrote: > On Jan 23, 2:29 am, David Cabana <[email protected]> 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 [email protected] > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
