Skip to content
Advertisement

Creating a “specific” form of XML, without string concatenation in SQL server T-SQL

I have some weird requirements that demand a specific XML format. Due to short deadlines and my lack of skills I decided to do a fast solution where I generate the XML through string concatenation.

and this gives the output which I need. However, I’ve been told numerous times that this is not best practice, and creating XMLs through string concatenation is discouraged. Is there some other way I can achieve the same outcome using more advanced XML techniques?

Advertisement

Answer

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement