March 6, 2003 at 7:31 am
I am using a simple "for xml auto" to return a xml from a pair of parent-child tables. I notice that, if a field of a record has null value, for xml would exclude this this field as an attribute from the element of the record.
Make sense most of the time, I'd say. However, I am just wondering if there is a way to still maintain the attribute node for that field even if the value is null?
My objective is to dump the data from the tables onto a spreadsheet from the returned xml using SelectNode(xpath). Absence of attribute nodes with null values would cause mis-alignment when I layout the data on a spreadsheet.
Thanks a lot.
March 10, 2003 at 8:00 am
This was removed by the editor as SPAM
March 12, 2003 at 1:36 pm
The only solution that I've found is to utilize the isnull(fldname,'') function to make sure that the result recordset has no null values.
I've also seen this when converting recordsets to XML via ADO "recordset" persistance.
March 12, 2003 at 3:48 pm
I don't know of any solution other than the proposed one, however I would like to say that an empty attribute should have the same effect on the client as the absence of an attribute. Otherwise the error is on the client side.
--
Chris Hedgate @ Apptus Technologies (http://www.apptus.se)
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply