Results 1 to 2 of 2

Thread: how to handle null values while generating output message from a xml schema

  1. #1
    Join Date
    Jan 2006
    Location
    Hyderabad, India
    Posts
    26

    how to handle null values while generating output message from a xml schema

    We have written an sql procedure to generate an xml schema. While generating the schema, some columns are not coming as it contains the null values. How to handle the null values while generating the schema using sql server 2005?

  2. #2
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    Look in BOL for "XSINIL"

    The Text
    The ELEMENTS directive constructs XML in which each column value maps to an element in the XML. If the column value is NULL, no element is added. By specifying the optional XSINIL parameter on the ELEMENTS directive, you can request that an element also be created for the NULL value. In this case, an element that has the xsi:nil attribute set to TRUE is returned for each NULL column value.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •