Seems like the "Prefix cannot be null" is still a problem. Do anyone have a solution to this?
I am trying to roundtrip inkscape-svg to be exact. It happens to contain a whole lot of namespaces. Smallest example: (-> "test.svg" slurp clojure.data.xml/parse-str clojure.data.xml/emit-str) On Thu, Oct 25, 2012 at 12:55 AM, nchurch <nchubr...@gmail.com> wrote: > Thanks Ryan! This stuff is hugely helpful. > > One other thing you might consider around design discussions: it would > be very useful to read XML both into clojure.xml-style structures and > also Hiccup-style structures (you already do it the other way in sexp- > as-element). Hiccup is a lot more compact and readable, and if your > project uses both XML and HTML (which I imagine most would) it would > be nice to share the same abstraction. > > David Santiago's Hickory project does this for HTML, but isn't > appropriate for XML. > > -Nick. > > On Oct 22, 7:07 pm, Ryan Senior <senior.r...@gmail.com> wrote: > > This is related to the (lack of) support for namespaces. I removed the > > prefixes from the attributes below and it roundtripped fine for me. > > > > As far as I know, there is no work around for this kind of thing. The > fix > > is for data.xml to support namespaces. I'll get some more design > > discussions going around namespaces this week. > > > > -Ryan > > > > > > > > > > > > > > > > On Mon, Oct 22, 2012 at 8:41 PM, nchurch <nchubr...@gmail.com> wrote: > > > Am I making a mistake, or is this a bug? > > > > > (use 'clojure.data.xml) > > > > > (def p (parse (reader "<../../>small.xml"))) > > > > > where "small.xml" is > > > > > <?xml version="1.0" encoding="utf-8"?> > > > <Keyboard xmlns:android="http://schemas.android.com/apk/res/android" > > > android:keyWidth="10%p" > > > android:horizontalGap="0px" > > > android:verticalGap="0px" > > > android:keyHeight="@dimen/key_height" > > > > > </Keyboard> > > > > > And happens to be taken from an Android UI-defining XML file. > > > > > But: > > > > > (emit-str p) > > > --> > > > XMLStreamException Prefix cannot be null > > > com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeAttribute > > > (XMLStreamWriterImpl.java:564) > > > > > If this has to do with the lack of namespace support, are there any > > > workarounds? > > > > > Thanks, > > > > > Nick. > > > > > -- > > > 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 > -- 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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.