Returns an ISchemaItemCollection
object. This collection contains the top-level ISchemaAttribute
objects for the XML Schema. The ISchemaAttribute
interface is used to further examine the collection of attribute objects.
This example uses attributes from the ISchema.attributes
property.
The VBScript example below uses the following XML Schema document.
<?xml version='1.0'?> <xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema' > <xsd:attribute name='attr1' type='xsd:string' /> <xsd:attribute name='attr2' type='xsd:date' /> </xsd:schema>
The following is the VBScript example.
Dim oSchemaCache as New XMLSchemaCache Dim oSchema as ISchema Dim oAttributes as ISchemaAttribute Dim nsTarget as String nsTarget = "http://www.w3.org/2000/09/xmldsig#" oSchemaCache.add nsTarget, "po.xsd" Set oSchema = oSchemaCache.getSchema(nsTarget) For Each oAttribute in oSchema.attributes msgbox oAttribute.name Next
The following VBScript example shows how to list the top-level <attribute>
declarations.
Set oSchemaCache = CreateObject("Msxml2.XMLSchemaCache.5.0") oSchemaCache.add "", "po.xsd" Set oSchema = oSchemaCache.getSchema("") For Each oAttribute in oSchema.attributes WScript.Echo oAttribute.name Next
var oAttributes = oISchema.attributes;
None.
<attribute>
declarations. This collection contains objects that implement the ISchemaAttribute
interface.Set oAttributes = oISchema.attributes
None.
<attribute>
declarations. This collection contains objects that implement the ISchemaAttribute
interface.HRESULT get_attributes (ISchemaItemCollection** attributes);
<attribute>
declarations.attributes
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 | ISchemaAttribute Interface
Applies to: ISchema Interface