The future is XML-with-namespaces: POM files and whatnot. Such cases are tricky because more than one notation is possible. You need a namespace-enabled parser to figure out what the XML text really means. Luckily, a contributed project, clojure.data.xml, can read XML-with-namespaces, and in good idiom return Clojure-namespaced keywords for the element names. (Its present version is 0.1.0-beta1, a work-in-progress.) You configure the namespaces to keywordize as its README illustrates:
(declare-ns "xml.html" "http://www.w3.org/1999/xhtml") (parse-str "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <foo:html xmlns:foo=\"http://www.w3.org/1999/xhtml\"> ... Could the same effect be obtained without the global state of namespace mappings? Do all uses of clojure.data.xml in an app, even fully encapsulated uses, have to agree about the keyword for any given well-known XML namespace URI? -- 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 --- 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 clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.