length Property (IXMLDOMParseErrorCollection)
This read-only property returns the number of items in the error collection.
[Script]
Script Syntax
count = objIXMLDOMParseErrorCollection.length;
[Visual Basic]
Visual Basic Syntax
count = objIXMLDOMParseErrorCollection.length;
[C/C++]
C/C++ Syntax Using Smart Pointers
count = objIXMLDOMParseErrorCollection->length;
C/C++ Syntax
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.
Example
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 three languages: JScript, Visual Basic, and C++. The output is the same in each language.
- Resource Files (books.xml and books.xsd)
- JScript Code (length.js)
- Visual Basic Code (length.frm)
- C/C++ Code (length.cpp)
- Output for the length Example
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 in the upper-left corner of the page.
See Also
item Property | next Property | reset Method