Valhalla Legends Archive

Programming => General Programming => Topic started by: Mr. Neo on May 18, 2005, 07:37 PM

Title: Empty Strings in XML-RPC
Post by: Mr. Neo on May 18, 2005, 07:37 PM
In XML-RPC, how does one go about handling an empty string?  The official spec doesn't say anything about it.  From what I've seen in several implementations of XML-RPC, the clients are only parsing for <string></string> as an empty element.  I know in XML you could do <string/>.  Would this be legal in XML-RPC?

An example would be:
<member><name>errors</name>
<value><string/></value></member>

Is this legal?  Or should it read:
<member><name>errors</name>
<value><string></string></value></member>

Any input on the issue would be great.  Also, any links to some sort of spec on how to handle an empty string would be appreciated.

Best,
Title: Re: Empty Strings in XML-RPC
Post by: MyndFyre on May 18, 2005, 08:05 PM
I've generally seen null values represented in XML as <string /> and empty strings as <string></string>.