What is the SOM?
[This topic discusses a feature that was only implemented for MSXML 6.0.]
The Schema Object Model (SOM) provides a navigable set of classes that directly reflect the W3C XML Schema Definition (XSD) specification. The W3C recommendation document, "XML Schema Part 0: Primer," is available at http://www.w3.org/TR/xmlschema-0/.
The interfaces of the SOM extract information about declarations in an XML Schema document. An XML Schema is retrieved from a schema cache. When using XSD schemas, this cache is accessed by the getSchema Method1 of the IXMLDOMSchemaCollection2-XMLDOMSchemaCollection interface. When using XDR schemas, this cache is accessed by the get method of the IXMLDOMSchemaCollection2 interface.
The SOM provides access to items in an XML Schema. Many of the interfaces inherit from other interfaces of the SOM. This inheritance allows a single property to provide several interfaces with individual information, using the same function.
SOM elements returned from interface properties originate at the top level of the XML Schema. The top level of an XML Schema consists of declarations that are not nested inside other declarations. The example below shows a top-level <ComplexType>
declaration, which contains a second-level <element>
declaration.
<schema xmlns = "http://www.w3.org/2001/XMLSchema">
<complexType name = "TopLevelType">
<all>
<element name = "SecondLevelElement"/>
</all>
</complexType>
</schema>
To navigate through the XML Schema to the secondary and lower child items, you must use the ISchemaComplexType.contentModel property. For a full description of navigating to the child items, see Finding Child Elements of Top-Level XML Schema Elements.