473,320 Members | 1,853 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,320 software developers and data experts.

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?

<elementName></elementName>
looks like a zero-length string (emptyString) but will evaluate to
null.

The data element in question may have its own datatype (string, title,
name, etc.) but also need to hold an emptyString value.
Jul 20 '05 #1
1 1966
In article <44**************************@posting.google.com >,
James <jw******@hotmail.com> 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.

-- Richard
Jul 20 '05 #2

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

Similar topics

0
by: cem marifet | last post by:
I am trying to pass in a null value into a webservice.How can this be accomplished in the raw soap message that goes to the server? I have a previous message regarding this. Thank You Cem Marifet
2
by: Pet Matrix. | last post by:
Hi, I am having the schema and one element in that schema is , <xs:element name="EndT" type="TstampType" minOccurs="1" maxOccurs="1"/> How do I represent the NULL value for the datatype dateTime...
4
by: reidarT | last post by:
I want to show data objects as Y-axis (rows) and dates alng x-axis (fields) Date 01.01.05 02.01.05 03.01.05 ... Obj1 Free Free Occupied Obj2 Free ...
1
by: David Shorthouse | last post by:
Hey folks, I am attempting to pass null as the input value from a series of textboxes if the user does not input a value prior to submit. To try and do this, I am using a vbscript function on...
3
by: PJ6 | last post by:
First up, I know I'll get some good answers here, but in general, are there any newsgroups devoted to overall application architecture? Second, sorry for cross-posting but in this case I think...
1
by: Greg | last post by:
Hi, I need to implement a table in XBRL. Let's assume I have 2 simple tables to define: TABLE 1 col1 col2 row1 A C row2 B D TABLE 2
6
by: linq936 | last post by:
Hi, I have the following code: #include <stdio.h> int main(void){ char* str1 = "abc"; char* str2 = '\0'; if ( strstr(str1, str2) == NULL ){ printf("yes\n");
4
by: jehugaleahsa | last post by:
Hello: We were hoping to allow users to have DateTimePicker value null so that a unused date is stored on a Database. Does the control support this? I am pretty sure it doesn't. How would you...
15
by: jehugaleahsa | last post by:
Hello: I would like to get default(T). However, I don't know what T is until runtime; I just have a Type. Is there an equivilent means of getting the results of default(T)? Thanks, Travis
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.