errorParameters Method


[This sample code uses features that were implemented only in MSXML 6.0.]

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.

System_CAPS_ICON_note.jpg Note

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

strParam = objXMLDOMParseError2.errorParameters(index);  

_bstr_t strParam = objXMLDOMParseError2->errorParameters (index);  
HRESULT errorParameters (  
    LONG index,  
    BSTR *strParam);      

A long integer representing the index of an error parameter.

A BSTR string containing the error parameter of the given index.

The error parameter has been retrieved successfully.

The index is out of bounds and the resultant strParam parameter is NULL.

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.

IXMLDOMParseError2 Interface

Implemented in: MSXML 6.0