473,394 Members | 1,740 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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

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: ma***********@madduck.net

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFH3R7kIgvIgzMMSnURAiKSAKC9gq4Ysnuy1Rm3Yx2SAr CM0iOcSgCgsTKk
E4v2x0l/23PS2Mz8DqakOg0=
=C0Qw
-----END PGP SIGNATURE-----

Mar 16 '08 #1
1 1898
On Sun, 16 Mar 2008 14:21:40 +0100, martin f krafft wrote:
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.
In XML-RPC there is no `None`, so there's the non standard `allow_none`
Option to allow `None` to be represented as ``<nil/>``.

And is an empty <param/or <value/really valid XML-RPC?

Ciao,
Marc 'BlackJack' Rintsch
Mar 17 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Weston C | last post by:
I'm trying to get the href attribute from the base tag in the document head. The following does not seem to work... any ideas what I'm doing wrong? if(!(document.getElementsByTagName) ||...
4
by: Martin Lucas-Smith | last post by:
I am wanting to know whether are XHTML1-valid characters for use within an id attribute and/or a name attribute. ...
11
by: Woolly Mittens | last post by:
I tried validating my gallery page using your validator. http://validator.w3.org/check?uri=http%3A%2F%2Fwww.woollymittens.nl%2Fcontent%2Fgallery%2Findex.asp To my surprise it informed me that...
59
by: Haines Brown | last post by:
I've not had a clear definition in my mind of "citation," and so have avoided it. For example, if I suggest that the reputation of the New York Times has suffered, is that a citation? I suppose...
14
by: xxbmichae1 | last post by:
I have a <select> object that i've set up an onchange event that fires in IE fine when I use the cursor up and down in the list, but If I use the cursor up and down in Firefox the event doesn't...
3
by: Jarek Mielcarek | last post by:
hi all, in xml file I have some fields which are source for <textarea> element. I'd like to transform this file using xslt and set the rows property of <textarea> depend of lines in some source...
2
by: Joseph Geretz | last post by:
Parser Error Message: Only one <configSections> element allowed. It must be the first child element of the root <configuration> element. OK, fine, easy enough to fix, I just need to copy and...
5
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi I have a list of type object. The object has an ID as one of the elements and I would like to create another list that just has objects with unique IDs. For example in the list if I have...
0
by: leon70 | last post by:
Hi Group, I built a gSoap 2.7.11 Web services client in C++ on AIX and have got it talking to the remote service. The service is sending back an array of objects to my client but the client is...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.