Hi, I've read http://nakkaya.com/2009/12/07/zipping-xml-with-clojure/ and 
http://stackoverflow.com/questions/1194044/clojure-xml-parsing/9595315#comment24442712_9595315
 , 
but the usage of (xml->) is still mysterious to me.

If I have this for my xml file...
(def myxml (zip-str "<level1>
                                <level2 a='the attribute'>
                                   <level3a>Text in level 3a</level3a>
                                   <level3b>Text in level 3b.</level3b>
                                </level2>
                              </level1>"))

My question is how the xml-> function determines how nested you have to 
specify things. Eg
(xml-> myxml :level1 text)
=> ()
(xml-> myxml :level2 text)
=> ("Text in level 3aText in level 3b.")
(xml-> myxml :level2 :level3a text)
=> ("Text in level 3a")

The last call gives the text in 3a, but why don't you have to specifiy that 
it is under level 1 as well as level 2?

Thanks

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to