clojure.xml questions

2010-10-30 Thread Shantanu Kumar
Hi,

1. I notice there is just the parse function mentioned as public:
http://clojure.github.com/clojure/clojure.xml-api.html

I used the other functions in clojure.xml (emit, emit-element) and the
var 'element' -- they appear to work fine for me. Are they just
undocumented or not guaranteed to be maintained in future versions of
Clojure?

2. The emitted XML string does not have indentation. Is there a way to
fix that? I know there is 'prxml' in contrib but the format it expects
is different (a vector) from what 'emit' expects (a map).

Regards,
Shantanu

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


Re: clojure.xml questions

2010-10-30 Thread Chris Perkins
On Oct 30, 2:52 am, Shantanu Kumar kumar.shant...@gmail.com wrote:
 Hi,

 1. I notice there is just the parse function mentioned as 
 public:http://clojure.github.com/clojure/clojure.xml-api.html

 I used the other functions in clojure.xml (emit, emit-element) and the
 var 'element' -- they appear to work fine for me. Are they just
 undocumented or not guaranteed to be maintained in future versions of
 Clojure?

I'm pretty sure emit is undocumented for a reason - the stuff it emits
is not, in general, valid XML. Use it at your peril.

user= (clojure.xml/emit {:tag :foo :content [!!!]})
?xml version='1.0' encoding='UTF-8'?
foo
!!!
/foo

- Chris

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


Re: clojure.xml questions

2010-10-30 Thread Stuart Halloway
Hi Shantanu,

In general, Clojure's public API consists of only those vars that both (1) are 
public and (2) have a docstring. Anything else is undocumented, subject to 
change, and should be avoided.

If you want to get involved with Clojure's XML support, I have just created a 
space in Confluence to discuss design of a new clojure.data.xml library: 
http://dev.clojure.org/display/DXML/Home. 

This is not currently a top priority for the Clojure/core team, but we will 
definitely provide design and implementation review if somebody in the 
community wants to lead the charge.

Cheers,
Stu

Stuart Halloway
Clojure/core team at Relevance
http://clojure.com
http://thinkrelevance.com

 Hi,
 
 1. I notice there is just the parse function mentioned as public:
 http://clojure.github.com/clojure/clojure.xml-api.html
 
 I used the other functions in clojure.xml (emit, emit-element) and the
 var 'element' -- they appear to work fine for me. Are they just
 undocumented or not guaranteed to be maintained in future versions of
 Clojure?
 
 2. The emitted XML string does not have indentation. Is there a way to
 fix that? I know there is 'prxml' in contrib but the format it expects
 is different (a vector) from what 'emit' expects (a map).
 
 Regards,
 Shantanu
 
 -- 
 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



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