Nil Value Functoid

Hi,

I follow the Sandro Pereria following blog for Nil Value functoid:

https://sandroaspbiztalkblog.wordpress.com/2014/06/12/biztalk-mapper-working-with-nillable-values-xsiniltrue/ 

But I have two doubt in it :

The first doubt: 

Here is the following input instance of xml schema:

<ns0:Employees xmlns:ns0="http://Schema.NilValueFunctoid_Input" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Employee>
    <ID xsi:nil="true"/>
    <FirstName xsi:nil="true"/>
  </Employee>
</ns0:Employees>

If you see in above input instance of xml schema , I have to add two things manually in my input schema:

first is http://www.w3.org/2001/XMLSchema-instance namespace and second is xsi:nil attribute in elements.

So my first doubt is that why we are adding manually these things for checking null values.

My second doubt is that in real world scenario what example describe the best null values in the concern of XML.

If we have .csv file and we convert it into XML through custom pipeline then how we put null values in .csv file so that

our xml schema recognise it.


July 4th, 2015 5:51am

@nil specifically means the element value is NULL, instead of an empty string, "".

<ID></ID> and <ID/> both mean empty string, "".

If <ID> is missing, that is either interpreted by the receiving system as unknown or unchanged if the message represents and update of some sort.

For example, <FirstName/> should update the database field to "" while <FirstName xsi:nil="true"/> should update the database field to NULL.

Free Windows Admin Tool Kit Click here and download it now
July 4th, 2015 9:12am

@nil specifically means the element value is NULL, instead of an empty string, "".

<ID></ID> and <ID/> both mean empty string, "".

If <ID> is missing, that is either interpreted by the receiving system as unknown or unchanged if the message represents and update of some sort.

For example, <FirstName/> should update the database field to "" while <FirstName xsi:nil="true"/> should update the database field to NULL.

July 4th, 2015 1:05pm

@nil specifically means the element value is NULL, instead of an empty string, "".

<ID></ID> and <ID/> both mean empty string, "".

If <ID> is missing, that is either interpreted by the receiving system as unknown or unchanged if the message represents and update of some sort.

For example, <FirstName/> should update the database field to "" while <FirstName xsi:nil="true"/> should update the database field to NULL.

Free Windows Admin Tool Kit Click here and download it now
July 4th, 2015 1:05pm

Hi Prakash ,

The Nillable property of the element is set to true on the schema property , this will tell that the value of an element in the document may be null instead of emtpty "". This NULL values will be expressed with xsi:nil = true attribute in the element.

example :

<ID xsi:nil="true" /> insert NULL value to Database for a column ID

<ID></ID> or </ID> will insert "" empty string value .

Thanks

Abhishek

July 5th, 2015 12:30am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics