Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This feature was only implemented for MSXML 6.0.]
Returns an identifier for the schema item in the form of a string. This identifier is the id attribute in the declaration of the item.
In MSXML 6.0, it is possible to have multiple schema locations for a single schema. This means that if the id property were implemented, it would be possible to have multiple id values declared in the schemas. Therefore, in MSXML 6.0, if there are multiple schema locations this method is not implemented. It returns a zero length string.
Example
The following is an example of the id attribute, used in an XML Schema.
<schema xmlns="http://www.w3.org/2001/XMLSchema">
<element name="book" id="bookID"/>
</schema>
JScript Syntax
var strID = oISchemaItem.id;
Parameters
None.
Return Values
strID
A string. The id attribute of the schema item.
Example
The following snippet is taken from the Walk the SOM sample application. In this snippet, the id property is retrieved from the ISchemaElement object through the inheritance of the ISchemaItem object's properties.
res = res + " id='" & oElement.id & "'"
Visual Basic Syntax
strID = oISchemaItem.id
Parameters
None.
Return Values
strID
A string. The id attribute of the schema item.
C/C++ Syntax
HRESULT get_id(BSTR* id);
Parameters
id[out,retval]
A string. The id attribute of the schema item.
Return Values
S_OK
The value returned if successful.
E_POINTER
The value returned if the id parameter is NULL.
E_FAIL
The value returned if something else is wrong.
Versioning
Implemented in: MSXML 6.0