length Property (IXMLDOMParseErrorCollection)

[This feature was first implemented in MSXML 5.0 for Microsoft Office Applications.]

This read-only property returns the number of items in the error collection.

count = objIXMLDOMParseErrorCollection.length;
count = objIXMLDOMParseErrorCollection.length;
count = objIXMLDOMParseErrorCollection->length;
HRESULT get_length(
    LONG *count);

Parameters

count[out, retval]

A pointer to a LONG value holding the number of items in the collection.

Return Values

S_OK

The value returned if successful. This property never fails.

The following code performs an XSD validation on an XML document that has two invalid <book> nodes. The code then outputs the number of errors in the resultant error collection.

The example uses the same two resource files used in the allErrors example. We've provided source files for the sample in two languages: JScript and C++. The output is the same in each language.

Implemented in:

MSXML 6.0

Show:
© 2014 Microsoft. All rights reserved.