I have a stored procedure that returns an object as XML. How do I handle the case where the object doesn’t exist?
I can’t return null or empty string as the XmlReader complains that it is not valid XML.
If I return an empty Tag, how do I tell if it is just an empty object or no object?
Well, a common approach is some marker attribute, such as
xsi:nil='true'(although this is just an example).