Re: xml: parse -- edit -- emit

2012-04-18 Thread Rostislav Svoboda
>> It seems build.clojure.org now uses Java 6 on the top of http://build.clojure.org/ stays: All projects build on Sun/Oracle JDK 1.5. "-test-matrix" jobs test multiple JDKs and Clojure versions. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To po

Re: xml: parse -- edit -- emit

2012-04-18 Thread Andrew
Ah ... After zip/edit comes zip/root ... xml/emit-str ... spit. On Tuesday, April 17, 2012 3:29:01 PM UTC-4, Andrew wrote: > > >1. It seems build.clojure.org now uses Java 6 so clojure.data.xml is >available for use (vs February 20 2012 -- correct me if I'm wrong) >2. Using clojure.zi

xml: parse -- edit -- emit

2012-04-17 Thread Andrew
1. It seems build.clojure.org now uses Java 6 so clojure.data.xml is available for use (vs February 20 2012 -- correct me if I'm wrong) 2. Using clojure.zip I'm able to make my desired edits. Then I call zip/root and I have my result. I'm not sure what the next steps are to get

Re: clojure.contrib.lazy-xml/parse-trim forces parsing whole input

2009-04-08 Thread Jouni K . Seppänen
On Apr 9, 7:01 am, Chouser wrote: > Thanks for the report.  I've checked in a change (rev 656) that I > think will solve the problem.  Let me know if it isn't sufficient. It seems to work fine; thanks! Jouni --~--~-~--~~~---~--~~ You received this message because

Re: clojure.contrib.lazy-xml/parse-trim forces parsing whole input

2009-04-08 Thread Chouser
On Wed, Apr 8, 2009 at 4:07 PM, Jouni K. Seppänen wrote: > > A friend of mine had a problem parsing a large XML file using lazy-xml/ > parse-trim, because it caused all of the input to be parsed at once: > > http://paste.lisp.org/display/78235 > > It seems to me that th

clojure.contrib.lazy-xml/parse-trim forces parsing whole input

2009-04-08 Thread Jouni K . Seppänen
A friend of mine had a problem parsing a large XML file using lazy-xml/ parse-trim, because it caused all of the input to be parsed at once: http://paste.lisp.org/display/78235 It seems to me that the problem is fixed by applying a small patch (uploaded as lazy-xml.patch), wrapping the calls to

Re: XML Namespaces :xmlns, was Re: xml/parse

2008-12-12 Thread Christopher Taylor
On 12.12.2008, at 15:49, J. McConnell wrote: > > On Fri, Dec 12, 2008 at 9:39 AM, Chouser wrote: >> >> On Fri, Dec 12, 2008 at 9:15 AM, J. McConnell >> wrote: >>> >>> {:tag :root, :attrs nil, :content [ >>> {:tag :fragment, :attrs nil, :content [ >>> {:tag :

Re: XML Namespaces :xmlns, was Re: xml/parse

2008-12-12 Thread J. McConnell
On Fri, Dec 12, 2008 at 9:49 AM, J. McConnell wrote: > On Fri, Dec 12, 2008 at 9:39 AM, Chouser wrote: >> >> I think it's often desirable to also maintain (somewhere) the original >> document's shortcut names, and use those where applicable when >> emitting XML text again. > > I agree. Unfortuna

Re: XML Namespaces :xmlns, was Re: xml/parse

2008-12-12 Thread Chouser
On Fri, Dec 12, 2008 at 9:15 AM, J. McConnell wrote: > > {:tag :root, :attrs nil, :content [ > {:tag :fragment, :attrs nil, :content [ >{:tag ::title, :attrs nil, > :content ["A HEAD Title"]} As I mentioned in another thread, keywords can already handle url

Re: XML Namespaces :xmlns, was Re: xml/parse

2008-12-12 Thread J. McConnell
On Fri, Dec 12, 2008 at 9:39 AM, Chouser wrote: > > On Fri, Dec 12, 2008 at 9:15 AM, J. McConnell wrote: >> >> {:tag :root, :attrs nil, :content [ >> {:tag :fragment, :attrs nil, :content [ >>{:tag ::title, :attrs nil, >> :content ["A HEAD Title"]} > > As I

Re: XML Namespaces :xmlns, was Re: xml/parse

2008-12-12 Thread J. McConnell
On Thu, Dec 11, 2008 at 8:49 PM, Robert Koberg wrote: > > Given an XML structure like: > > http://purl.org/dc/elements/1.1/"; > > http://www.w3.org/1999/xhtml";> > A HEAD Title > A BODY Title > > http://www.w3.org/1999/xhtml";> > A HEAD Title > A BODY Title > > > > whi

Re: XML Namespaces :xmlns, was Re: xml/parse

2008-12-11 Thread Robert Koberg
Hi, Given an XML structure like: http://purl.org/dc/elements/1.1/"; > http://www.w3.org/1999/xhtml";> A HEAD Title A BODY Title http://www.w3.org/1999/xhtml";> A HEAD Title A BODY Title which will be parsed by clojure.xml/parse and converted into a nested c

Re: XML Namespaces :xmlns, was Re: xml/parse

2008-12-11 Thread Robert Koberg
> Apologies for responding to myself, but maybe an example might help (inline below) >> >> Hi again, >> >> I see the default ContentHandler implementation does not handle XML >> Namespaces. Is that the case or does the :xmlns symbol > > I meant keyword (I think) here. For example, say I have

Re: XML Namespaces :xmlns, was Re: xml/parse

2008-12-11 Thread Robert Koberg
On Dec 11, 2008, at 3:44 PM, Robert Koberg wrote: > > Hi again, > > I see the default ContentHandler implementation does not handle XML > Namespaces. Is that the case or does the :xmlns symbol I meant keyword (I think) here. For example, say I have /xml/ like: {:tag :my-root, attrs {:xmlns:x

XML Namespaces :xmlns, was Re: xml/parse

2008-12-11 Thread Robert Koberg
Hi again, I see the default ContentHandler implementation does not handle XML Namespaces. Is that the case or does the :xmlns symbol provide some meaning to the (nested) collection(s)? Is there such a thing as namespacing a collection that would be based on the xmlns? thanks, -Rob --~--~-

Re: xml/parse

2008-12-11 Thread Robert Koberg
n 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-fi

Re: xml/parse

2008-12-11 Thread Robert Koberg
On Dec 11, 2008, at 3:23 PM, Kevin Downey wrote: > 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 &g

Re: xml/parse

2008-12-11 Thread Shawn Hoover
d 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/

Re: xml/parse

2008-12-11 Thread Kevin Downey
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 l

xml/parse

2008-12-11 Thread Robert Koberg
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