Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting rid of xsi:nil="true"

Status
Not open for further replies.

davidlowry

Programmer
Jul 31, 2006
1
GB
Hi All,
New to this forum, hoping it can of some use!! Appreciate any help you can give.

I'm calling a webservice with C Sharp, and I have a few optional parameters, for example I want to see either/or:

<ng1:defaultAmount>50</ng1:defaultAmount>
<ng1:endDueDate>13-12-2009</ng1:endDuedate>

I have defaultAmount set to a String (System.Nullable<String>) so that whenever it is null the tag will not show in the output xml, however it appears that decimals (which defaultAmount 'should' be) and dates (as endDueDate still is) will not just disappear when the values are null, instead they show:

<ng1:endDueDate xsi:nil="true" />

Can anyone point me in a direction that will magically make this 'xsi:nil="true"' 'feature' disappear!?

Thanks!
All the best
Dave
 
That's how you indicate a null/nil value in XML.

If you have access to the XSD, you ought to be able to remove the nillable attribute, and see what you get.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top