Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - DOM Reference

errorParameters Method

Returns the parameter value for a given index. This parameter value is a string that is used in the construction of the error message. For example, when a validation error is reported on a missing element, the first error parameter, errorParameters(0), shows where the missing element is located and the second error parameter, errorParameters(1), shows which element is missing.

Note   The error parameters returned from this method are specific to each error message. An error message might not have any error parameters.
[Script]

Script Syntax

strParam = objXMLDOMParseError2.errorParameters(index);
[Visual Basic]

Visual Basic Syntax

strParam = objXMLDOMParseError2.errorParameters(index);
[C/C++]

C/C++ Syntax Using Smart Pointers

_bstr_t strParam = objXMLDOMParseError2->errorParameters (index);

C/C++ Syntax

HRESULT errorParameters (
    LONG index,
    BSTR *strParam);    

Parameters

index [in]
A long integer representing the index of an error parameter.
strParam [out,retval]
A BSTR string containing the error parameter of the given index.

Return Values

S_OK
The error parameter has been retrieved successfully.
E_FAIL
The index is out of bounds and the resultant strParam parameter is NULL.

Example

This example uses the same two resource files used in the allErrors example, books.xml and books.xsd. We've provided source files for the sample in three languages: JScript, Visual Basic, and C++. The output is the same in each language.

Applies To

IXMLDOMParseError2 Interface

Versioning

MSXML 5.0 and later