As a matter of interest, one can get the keys keys in an unknown struct by
allocating an empty struct;

(def st (create-struct :a :b :c))
(keys (struct st))
(:a :b :c)

-Adrian.

On Tue, Jun 30, 2009 at 12:14 AM, samppi <rbysam...@gmail.com> wrote:

>
> Wonderful. Thanks for the answer.
>
> On Jun 29, 2:47 pm, Rich Hickey <richhic...@gmail.com> wrote:
> > On Jun 29, 4:59 pm, samppi <rbysam...@gmail.com> wrote:
> >
> > > clojure.xml/parse returns a PersistentStructMap. Is there a way to
> > > refer to its struct template? I wish to create accessors for its keys,
> > > such as :tag, :attrs, and :content, with the accessor function for
> > > speed.
> >
> > If you look at the top of xml.clj you'll see they already exist.
> >
> > Rich
> >
>

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