This read-only property returns a parseErrorCollection object containing all errors and warnings found during validation.
var oAllErrs = objXMLDOMParseError2.allErrors;
Set oAllErrs = objXMLDOMParseError2.allErrors;
IXMLDOMParseErrorCollectionPtr oAllErrs=objXMLDOMParseError2->allErrors;
HRESULT get_allErrors(
IXMLDOMParseErrorCollection **oAllErrs)
IXMLDOMParseErrorCollection object.oAllErrs parameter was called on error item belonging to a parseErrorCollection object.To retrieve multiple validation errors, you must enable MultipleErrorMessages on the DOM. To do so, you must explicitly set the MultipleErrorMessages parameter to true, as shown in the following JScript code fragment:
ObjDom.setProperty("MultipleErrorMessages", true);
The allErrors parameter is only meaningful when it is called on the top-level parseError object returned from a DOM object, as follows:
errCollection = domObj.parseError.allErrors;
It is an error to call the allErrors parameter on a parseError object returned at lower levels in the DOM such as in the following example:
ErrCollection = domObj.parseError.allErrors.item(0).allErrors;
In this case, the allErrors parameter returns NULL. The corresponding HRESULT value is E_FAIL.
The example uses two resource files, books.xml and books.xsd. The first is an XML data file, and the second is the XML Schema for the XML data. The XML document has two invalid <book> elements: <book id="bk002"> and <book id="bk003">. The sample application uses several methods and properties of the IXMLDOMParseError2 interface to examine the resulting parse errors.
We've provided source files for the sample in three languages: JScript, Visual Basic, and C++. The output is the same in each language.
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.
errorParameters Method | errorParametersCount Property | errorXPath Property | IXMLDOMParseErrorCollection Interface