Contents tagged with Namespaces

  • Suppressing namespace attributes in nested select statements when using FOR XML workaround

    Tags: Flwor, XQuery, Xml, Namespaces

    I was helping out on the forums the other day with a user who had stumbled across the quirk of SQL putting in an excessive amount of namespace declarations when using nested select statements as part of a FOR XML statement. There is a connect item already open for this, but at the end of the day, the output from SQL is correct, it just bloats the xml. Attached to the connect item is a link to a workaround but it doesn’t work for me as it only solves the problem if none of the xml nodes or … more