your problem is '
' makes xml/parse a symbol and stops evaling it to a function
symbols are callable like keywords so if you have a hash with symbols
as keys you can
('a {'a 1 'b 2}) -> 1

so ('xml/parse "/Users/me/correct/path/to/my.xml") is trying to lookup
'xml/parse in "/Users/me/correct/path/to/my.xml" doesn't find it, and
returns nil


On Thu, Dec 11, 2008 at 12:01 PM, Robert Koberg <r...@koberg.com> wrote:
>
> Hi, (very new to clojure, emacs and lispish things)
>
> I am using the latest downloadable clojure (rather than SVN, which I
> do have and see it is a bit different) in Aquamacs. I have installed
> the clojure mode and am using it with inferior-lisp to see output.
>
> When looking at the source for the clojure/xml/xml.clj, I see the
> example at the bottom which I modified to get to work (note the
> apostrophe before xml/parse):
>
> (load-file "/Users/me/Downloads/clojure/src/clj/clojure/xml/xml.clj")
> (def x ('xml/parse "/Users/me/correct/path/to/my.xml"))
>
> ; also tried URIs with file:///, file:// and file:/
>
> Am I doing something wrong (my actual path to the xml is truly
> correct)? When I don't use the apostrophe I get an exception saying
> the namespace xml cannot be found.
>
> But, since it seems to parse my xml, I get nil when trying to look at
> what it is parsed to:
>
> user=> #'clojure.xml/emit
> user=> #'user/x
> user=> x ;also tried user/x, 'user/x, #'user/x...
> nil
>
> I am sure this is an error between keyboard and chair, but what?
>
> thanks,
> -Rob
>
> >
>



-- 
And what is good, Phaedrus,
And what is not good—
Need we ask anyone to tell us these things?

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