Share via


XML Schema Object Model (SOM) 

An XML schema is a powerful and complex tool for creating and validating structure in compliant XML documents. Similar to data modeling in a relational database, a schema provides a way to define the structure of XML documents, by specifying the elements that can be used in the documents, as well as the structure and types that these elements must follow in order to be valid for that specific schema.

The Schema Object Model (SOM) provides a set of classes in the System.Xml.Schema namespace that allow you to read a schema from a file or to programmatically create a schema in-memory. The schema can then be traversed, editing, compiled, validated, or written to a file.

In This Section

  • Building XML Schemas
    Describes how to use the classes in the System.Xml.Schema namespace to build XML schemas in-memory.
  • Traversing XML Schemas
    Describes how to traverse an XML schema to access the elements, attributes, and types stored in the SOM.