I have a varchar(max) field with XML data in it. I need to clean it by removing the spaces between the tags. For eg:
</tns:time_changed> <tns:changed_properties>
should be cleaned as
</tns:time_changed><tns:changed_properties>
I need to do this in a single query and I cannot use replace all white spaces as there are other relevant spaces in the content.
Converted to XML type and it automatically took care of the spaces.
Replaced the
from the field with a blank and it got rid of the error that I was getting “text/xmldecl not at the beginning of input”.