On 1 August 2010 17:15, Manfred Lotz <[email protected]> wrote: > Hi Randy, > > On Sun, 1 Aug 2010 06:23:58 -0700 (PDT) > Randy Hudson <[email protected]> wrote: > >> Hi Manfred, >> >> I'm sorry the code wasn't quite correct. The EntityResolver is set on >> the parser's XMLReader, not on the parser itself: >> >> (def parser (.newSAXParser (SAXParserFactory/newInstance)) >> (.setEntityResolver (.getXMLReader parser) resolver) > > It doesn't work. Even if I add a ) in the end I get > Exception in thread "main" java.lang.Exception: Too many arguments to > def (test.clj:21) > > I tried then: > > (def parser (doto (.newSAXParser (SAXParserFactory/newInstance)) > (.setEntityResolver (.getXMLReader parser) resolver)))
I think he meant this: (def parser (.newSAXParser (SAXParserFactory/newInstance))) (.setEntityResolver (.getXMLReader parser) resolver) -- Michael Wood <[email protected]> -- 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
