How can I get an XML Schema (XSD) from SQL Server?

Liquid XML does not support directly retrieving an XML Schema (XSD) from SQL Server, however, SQL Server will provide this for you.

Example: To retrieve the XSD for the 'Order' table you can run:

Select * from [order] where ID < 0 FOR XML AUTO, XMLSCHEMA

This will just return the XSD (as the where clause will not return any order records).