Valhalla Legends Forums Archive | General Programming | Empty Strings in XML-RPC

AuthorMessageTime
Mr. Neo
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,
May 19, 2005, 12:37 AM
Myndfyr
I've generally seen null values represented in XML as <string /> and empty strings as <string></string>.
May 19, 2005, 1:05 AM

Search