On 2011-10-23, at 21:20 , Guy Nesher wrote:
> Hi,
> 
> I've started playing with Piston several days ago but I'm unable to
> create XML attributes.
> Do I need to create a special emitter for that ?
>From what I can read in the XMLEmitter code, I would think so yes: Piston's 
>built-in XMLEmitter maps arbitrary resources to element trees, and does not 
>bother with attributes at all (I don't see how you could built a simple 
>generic emitter deciding whether to serialize a given dict to attributes or to 
>elements, that would at the very least require pre-checking all dicts to check 
>whether their values are all atomic, and due to the way SAX serializers work 
>it would have to be done before creating the parent node)

If you want to generate attributes, you will have to create a custom emitter 
indeed.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to