Hi all, I am trying to use (abuse? *) zip-filter to remove some nodes and return the xml tree to me. If I do something like this: (xml1-> zipped-xml zf/descendants :model zip/remove zip/root)
I can remove one :model node, but what if I want to remove more than one or all of the :model nodes? If I do this: (xml-> zipped-xml zf/descendants :model zip/remove zip/root) I get multiple xml-trees each with one node removed from each. So I wrote a function "zip-top" to take me back to the top (like zip/root but returns the loc not node) and can do this: (xml-> zipped-xml zf/descendants :model zip/remove zip-top zf/ descendants :model zip/remove zip/root) and that will remove two of them but that is not really ideal I would like to remove all of them ... any ideas? am I way off track? is there better ways to manipulate xml trees in clojure? Enlive maybe? I haven't played with it yet. * I realise this probably abusing zip-filter since it is only supposed to take predicates and zip/remove is not really a predicate. 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