Representing Null vs. EmptyString in XML
In certain applications, it is necessary to distinguish between an
emptyString vs. a null value. What is the appropriate way to make
this distinction in XML?
looks like a zero-length string (emptyString) but will evaluate to
The data element in question may have its own datatype (string, title,
name, etc.) but also need to hold an emptyString value.
Re: Representing Null vs. EmptyString in XML
In article <email@example.com >,
James <firstname.lastname@example.org> wrote:
>In certain applications, it is necessary to distinguish between an
>emptyString vs. a null value. What is the appropriate way to make
>this distinction in XML?
There isn't a way to do this defined in plain XML, but you can make up
your own way of doing it. A natural way is to use an attribute, and
if you're using XML Schema then it provides one: xsi:nil="true" (where
xsi is bound to the schema instance namespace). Nothing stops you
from using this even when you're not using XML Schema, though you will
have to interpret it yourself in the application.
|All times are GMT. The time now is 02:53 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.