contentType Property1
[This feature was first implemented for MSXML 6.0.]
Returns an integer that corresponds to a declared constant value of the SCHEMACONTENTTYPE enumeration. See XML SOM Enumerated Constants for the integer values.
The following table lists the four possible content types and their descriptions.
SCHEMACONTENTTYPE value | Description |
---|---|
SCHEMACONTENTTYPE_EMPTY | Type does not contain elements, text, or attributes. |
SCHEMACONTENTTYPE_TEXTONLY | Type contains only text. No elements or attributes. |
SCHEMACONTENTTYPE_ELEMENTONLY | Type contains only element declarations. |
SCHEMACONTENTTYPE_MIXED | Type contains elements, attributes, or text. |
JScript Syntax
var conContentType = oISchemaComplexType.contentType;
Parameters
None.
Return Values
conContentType
An integer. The contentType
of the complexType
.
Example
The following snippet is taken from the Walk the SOM sample application. In this snippet, the contentType
property is retrieved from the ISchemaComplexType
object.
If oComplex.contentType = SCHEMACONTENTTYPE_EMPTY Then
res = res + printRemark("emtpy")
End If
Visual Basic Syntax
conContentType = oISchemaComplexType.contentType
Parameters
None.
Return Values
conContentType
An integer. The contentType
of the complexType
.
C/C++ Syntax
HERESULT get_contentType (SCHEMACONTENTTYPE* contentType);
Parameters
contentType[out,retval]
An integer. The contentType
of the complexType
.
Return Values
S_OK
The value returned if successful.
E_FAIL
The value returned if something is wrong.
Versioning
Implemented in: MSXML 6.0