Поделиться через


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.

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.

JScript Syntax

var oSchemaItem = oSchemaItemCollection.item(1);  

Visual Basic Syntax

Set oSchemaItem = oSchemaItemCollection.item
(1)  

C/C++ Syntax

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

Requirements

Implementation: msxml6.dll. msxml6.lib

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

Inheritance: None.

Versioning

Implemented in: MSXML 6.0

See Also

itemByName Method
itemByQName Method
Declaring Attributes
Declaring Elements
SOM Reference