Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have a stored procedure which creates xml content and then is stored to a xml file. Is it possible to validate the generated xml content against a dtd file?

Thank you in advance!

share|improve this question

1 Answer 1

up vote 1 down vote accepted

It is not possible to validate XML against a DTD file using SQL Server.

You can validate the XML with a XSD stored in a XML Schema Collection using a strong typed XML variable

DECLARE @x xml(YourXMLSchemaCollectionName);
SET @X = 'YourXML';
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.