1: SELECT
   2:     sys.xml_schema_collections.xml_collection_id    AS CollectionID,
   3:     sys.xml_schema_collections.name                 AS SchemaName,
   4:     sys.xml_schema_elements.name                    AS ElementName,
   5:     sys.xml_schema_attributes.name                  AS AttributeName
   6: FROM
   7:     sys.xml_schema_collections
   8:     INNER JOIN sys.xml_schema_attributes
   9:     ON sys.xml_schema_collections.xml_collection_id =  sys.xml_schema_attributes.xml_collection_id
  10:     INNER JOIN sys.xml_schema_elements
  11:     ON sys.xml_schema_collections.xml_collection_id = sys.xml_schema_elements.xml_collection_id
  12: WHERE
  13:     sys.xml_schema_collections.name NOT LIKE 'sys'

Sample Result:

SQLXML Sample Result - Elements and Attribute Names

Share :
  • Digg
  • del.icio.us
  • Google
  • description
  • StumbleUpon
  • Technorati
  • TwitThis

Related posts:

  1. SQLXML : How to List Columns That Have the XML Data Type
  2. SQLXML : How to Create an XML Schema
  3. SQLXML : How to Check if an XML Schema Already Exists
  4. SQLXML : How to Alter Existing Column Schema (XSD)
  5. SQLXML : How to Work With XML Elements (or Nodes) in SQL Server
  6. List all ASCII characters