Why doesn't xmlrpclib.dumps just dump an empty value instead of <nil/>?

Michael Wieher michael.wieher at gmail.com
Sun Mar 16 10:05:19 EDT 2008


2008/3/16, martin f krafft <madduck at madduck.net>:
>
> Hi,
>
> xmlrpclib.dumps((None,), allow_none=True) yields
>
>   '<params>\n<param>\n<value><nil/></value></param>\n</params>\n'
>
> Why doesn't it just yield
>
>   '<params>\n<param>\n<value/></param>\n</params>\n'
>
> Or even just
>
>   '<params>\n<param/>\n</params>\n'
>
> Those are valid XML and valid XML-RPC, but <nil/> isn't.
>
> Thanks for any thoughts...
>
>
> --
> martin | http://madduck.net/ | http://two.sentenc.es/
>
> a farmer is a man outstanding in his field.
>
> spamtraps: madduck.bogus at madduck.net


No real idea, but to me it seems like a decent way to be double-sure that
you actually got the complete and correct dump-file... otherwise, you might
be just missing part of it... maybe there's a real reason though?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080316/a152b235/attachment-0001.html>


More information about the Python-list mailing list