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

Reply via email to