ISchemaItem Interface


[This feature was only implemented for MSXML 6.0.]

Returns information about all the individual items in an XML Schema. The itemByName and itemByQName methods of the ISchemaItemCollection interface return the ISchemaItem objects. The information provided by the ISchemaItem interface is top-level. To obtain more information about the item, use the other interfaces in the SOM. For a list of these interfaces, see the SOM Reference overview.


The following is an example of an XML Schema document with some schema items and the properties obtained from ISchemaItem.

<xsd:schema xmlns:xsd=""  
  <xsd:element name="book">  
      <xsd:attribute name="booktitle"/>  


id Retrieves the id attribute of the schema item.
itemType Retrieves the type of the schema item.
name Retrieves the name of the item. The name is an NCName as defined by XML-Namespaces.
namespaceURI Retrieves the namespace URI of the item.
schema Retrieves the parent schema of the item.
unhandledAttributes Retrieves the collection of attributes that are not defined in the schema namespace.


writeAnnotation Writes an annotation to the XML Schema and to items in the XML Schema.

JScript Syntax

var oSchemaItem = oSchemaItemCollection.item(1);  

Visual Basic Syntax

Set oSchemaItem = oSchemaItemCollection.item

C/C++ Syntax

HRESULT item(long index, ISchemaItem** item);  


Implementation: msxml6.dll. msxml6.lib

Header and LIB files: msxml6.h, msxml6.lib, msxml6.idl

Inheritance: None.


Implemented in: MSXML 6.0

See Also

itemByName Method
itemByQName Method
Declaring Attributes
Declaring Elements
SOM Reference