Partager via


isValid Method1

 

[This feature was only implemented for MSXML 6.0.]

Returns a Boolean true or false. If true, the data sent to the isValid method is valid according to the type definition of the ISchemaType object being queried. If false, the data is not valid.

JScript Syntax

var bolValid = oISchemaType.isValid(strData);  

Parameters

strData
A string. The data to be validated.

Return Values

bolValid
A Boolean value. The result of validation of the passed-in data.

Visual Basic Syntax

bolValid = oISchemaType.isValid
(strData)  

Parameters

strData
A string. The data to be validated.

Return Values

bolValid
A Boolean value. The result of validation of the passed-in data.

C/C++ Syntax

HRESULT isValid(BSTR data, VARIANT_BOOL* valid);  

Parameters

data[in]
A string. The data to be validated.

valid[out,retval]
A Boolean value. The result of validation of the passed-in data.

Return Values

S_OK
The value returned if successful.

S_INVALIDARG
The value returned if the data string is NULL.

S_POINTER
The value returned if the Valid return value is NULL.

S_NOTIMPL
The value returned if itemType property is SOMITEM_DATATYPE_QNAME or SOMITEM_COMPLEXTYPE.

E_FAIL
The value returned if something else is wrong.

Remarks

Documents containing Qname or NOTATION types or types derived from them cannot be validated currently with XSD. Therefore, validation will fail with E_FAIL and the valid parameter will be returned as VARIANT_TRUE and isValid will return S_FALSE.

Versioning

Implemented in: MSXML 6.0

Applies to

ISchemaType Interface

See Also

itemType Property1