clojure.xml unable to find method on SAXparser
clojure
Solution
It was my misunderstanding of clojure.xml - when you pass it a string, it is looking for a URI of where to load the XML content. If you have XML as a string already, convert it to a stream and pass it to clojure.xml, something like:
(let [stream (java.io.ByteArrayInputStream. (.getBytes (.trim xml)))]
Problem
I am using clojure 1.3.0, and clojure.xml, however, trying to parse XML produces: IllegalArgumentException No matching method found: parse for class com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:79) (this is java 1.6) - a version mismatch between sax parsers and clojure 1.3? EDIT: I also tried Clojure 1.4, same problem. Must be a JDK issue?