Friday, February 24, 2012

Extracting XSD Collection

I've got a really quick - and I'm sure easy - question...

I'm wondering is there any way to extract an XSD Schema collection so that it appears as a well formed XML document?

The only thing I've seen is if you right click on a sche,a collection, you can either script it as a CREATE or a DROP. The CREATE script has no formatting whatsoever - it's all one one line.

If anyone has done this or knows of an effective way to accomplish this, your help would be greatly appreciated!

Thanks!

SELECT xml_schema_namespace('db_SchemaName','XmlSchemaCollectionName')

e.g.: SELECT xml_schema_namespace('dbo','MyXmlSchema')

|||Thanks Phe....!!

No comments:

Post a Comment