Share via


maxLength Property1

 

[This feature was only implemented for MSXML 6.0.]

Returns a variant of type VT_BSTR. This variant indicates the maximum number of units in the lexical space of this type. For more information about the maxLength facet, see Data Type Facets.

JScript Syntax

var varMaxLength = oISchemaType.maxLength;  

Parameters

None.

Return Values

varMaxLength
A variant. The value of the maxLength facet of the restriction.

Example

The following snippet is taken from the Walk the SOM sample application. In this snippet, the maxLength property is retrieved from the ISchemaType object.

    If oType.maxLength > -1 Then
        res = res + printTab(t+1) + "<xsd:maxLength value='" & oType.maxLength & "'/>" + vbNewLine
    End If

Visual Basic Syntax

varMaxLength = oISchemaType.maxLength  

Parameters

None.

Return Values

varMaxLength
A variant. The value of the maxLength facet of the restriction.

C/C++ Syntax

HRESULT get_maxLength (VARIANT* maxLength);  

Parameters

maxLength[out,retval]
A variant. The value of the maxLength facet.

Return Values

S_OK
The value returned if successful.

E_POINTER
The value returned if the maxLength parameter is NULL.

E_FAIL
The value returned if something else is wrong.

Note

If the facet is not used, the property will return "-1".

Versioning

Implemented in: MSXML 6.0

Applies to

ISchemaType Interface

See Also

Data Type Facets