Hi Randy,

On Sun, 1 Aug 2010 06:23:58 -0700 (PDT)
Randy Hudson <randy_hud...@mac.com> 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)))

which doesn't work either:
Exception in thread "main" java.lang.IllegalStateException: Var
xmltest/parser is unbound. (xmltest.clj:20)

I understand that parser after .getXMLReader cannot be resolved but I'm
unsure what has to be there.


-- 
Manfred



-- 
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

Reply via email to