ISchemaItem Interface

MSXML 5.0 SDK

Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - SOM Reference

ISchemaItem Interface

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.

Example

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

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:pub="http://www.lucernepublishing.com/fake/schema">
  <xsd:element name="book">
    <xsd:complexType>
      <xsd:attribute name="booktitle"/>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>

Properties

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.

Methods

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

[Script]

Implementation Syntax

var oSchemaItem = oSchemaItemCollection.item(1);
[Visual Basic]

Implementation Syntax

Set oSchemaItem = oSchemaItemCollection.item(1)
[C/C++]

Implementation Syntax

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

Versioning

MSXML 4.0 and later

Requirements

[Visual Basic, C/C++]

Implementation: msxml5.dll, msxml2.lib

[C/C++]

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

Inheritance: None.

To view reference information for Visual Basic or C/C++ only, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

ISchemaItemCollection itemByName Method | ISchemaItemCollection itemByQName Method | Declaring Attributes | Declaring Elements | SOM Reference