When should I use the XML data type in SQL Server

sql serverxml

When should I use the XML data type in Microsoft SQL Server?

Best Answer

I've done a similar thing where I serialize object data to XML for storage. This removes the burden of having tables, columns, and relationships in place to hold data for complex objects. The process can be helped by using a schema that the result XML conforms to, and the database tables can be used for meta information about the objects in question. In my case, expanding database schema to accommodate the object layout would be a big task!