reset Method (IXMLDOMParseErrorCollection)

MSXML 5.0 SDK

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

reset Method (IXMLDOMParseErrorCollection)

Resets the internal position to start, so that the next method will return the first error in the list.

[Script]

Script Syntax

objIXMLDOMParseErrorCollection.reset();
[Visual Basic]

Visual Basic Syntax

objIXMLDOMParseErrorCollection.reset();
[C/C++]

C/C++ Syntax

HRESULT reset()

Parameters

None.

Return Values

S_OK
The value returned if successful. This method never fails.

Example

The following example illustrates the reset method. An attempt to validate XML data against an XML Schema results in two errors, because the XML file contains two invalid <book> elements. The code calls next on the resultant error collection object to walk through the collection, then calls the reset method and returns to the first error.

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

IXMLDOMParseErrorCollection Interface

Versioning

MSXML 5.0 and later

To view reference information for Visual Basic, C/C++, or Script only, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

_newEnum Property | length Property | item Property | next Property