Returns an ISchemaItemCollection object. This collection contains ISchemaElement objects that are top-level items. To find secondary and lower child items, you must use the ISchemaComplexType.contentModel property.
To obtain information about the elements that are returned in the collection, use the ISchemaElement interface. For more information about using elements in an XML Schema, see Declaring Elements in the XML Schema Developer's Guide.
The following is an example of an element declared in an XML Schema.
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="Software">
<xsd:complexType>
<xsd:all>
<xsd:element name="title" />
<xsd:element name="company" />
</xsd:all>
</xsd:complexType>
</xsd:element>
</xsd:schema>
The following VBScript example shows how to list the top-level <element> declarations.
Set oSchemaCache = CreateObject("Msxml2.XMLSchemaCache.5.0")
oSchemaCache.add "", "po.xsd"
Set oSchema = oSchemaCache.getSchema("")
For Each oElement in oSchema.elements
WScript.Echo oElement.name
Next
var oElements = oISchema.elements;
None.
<element> declarations. This collection contains objects that implement the ISchemaElement interface.Set oElements = oISchema.elements
None.
<element> declarations. This collection contains objects that implement the ISchemaElement interface.HRESULT get_elements (ISchemaItemCollection** elements);
<element> declarations.elements collection is NULL.To view reference information for Visual Basic or C/C++ only, click the Language Filter button
in the upper-left corner of the page.
ISchemaItemCollection Interface | ISchemaElement Interface
Applies to: ISchema Interface