Hi,
I'm looking for a way to get the Query Multipe to return the XML with the correct XML standard convention for nulls from the datastore.
Query Multiple currently returns:
<FacilityList>
<Facility>
<Id>1111</Id>
<Name>Auto Fac Name 2 20100901</Name>
<Alias>AFN</Alias>
<PhysicalAssetBusinessNumber/> <--blank in database. XML fine.
<PhoneNumber>null</PhoneNumber> <--null in database but this is wrong for XML
</Facility>
</FacilityList>
Should be:
<FacilityList>
<Facility>
<Id>1111</Id>
<Name>Auto Fac Name 2 20100901</Name>
<Alias>AFN</Alias>
<PhysicalAssetBusinessNumber/>
</PhoneNumber xsi:nil="true">
</Facility>
</FacilityList>
Any suggestions or explanations as to why this is the case?
Thanks!
Solved! Go to Solution.
Views
Replies
Total Likes
In the case of MySQL, if the column allows nulls and the value is null, the XML result set will include 'null'. It probably varies by database and JDBC driver.
You will have to use XSLT to manage the transformation to xsi:nil="true".
Steve
Views
Replies
Total Likes
In the case of MySQL, if the column allows nulls and the value is null, the XML result set will include 'null'. It probably varies by database and JDBC driver.
You will have to use XSLT to manage the transformation to xsi:nil="true".
Steve
Views
Replies
Total Likes
Hi,
Okay that's what I thought. What I don't understand is why. The standard is pretty clear. What's the reasoning behind not returning nulls correctly represented?
Also, do you have an XSLT example somewhere handy?
Thanks!
Views
Replies
Total Likes