#include <IXMLValidator.h>
|
| enum | { kDefaultIID = IID_IXMLVALIDATOR } |
| |
Interface for a performing validation and storing any resulting validation errors.
- See Also
- XMLDTDValidationError
- XMLDTDValidateSuggest
| virtual void IXMLValidator::ClearErrors | ( | | ) | |
| pure virtual |
Clear the most recent set of errors generated by a validate operation.
| virtual int32 IXMLValidator::GetErrorCount | ( | | ) | const |
| pure virtual |
Accessor for the number of errors generated by the last validation. The number may be limited by the maximum number of errors allowed during the validation.
- Returns
- count of the validation errors
| virtual void IXMLValidator::Validate | ( | const XMLReference & | startXMLRef, | | | int32 | maxErrors = 250, | | | bool16 | treatAsRoot = kFalse, | | | bool16 | checkHasDTD = kFalse | | ) | | |
| pure virtual |
Validate the XML against a DTD. Note: Client must clear the errors before calling Validate if they want to generate a completely new list. This method will append new errors to the existing list.
- Parameters
| startXMLRef | XMLReference of the element to start the validation at. Use XML document element to validate the entire XML |
- See Also
- XMLDTDValidationError
- Parameters
| maxErrors | maximum number of errors to retrieve. Use -1 to get all the errors |
| treatAsRoot | if startXMLRef is not the document element or the root element, whether to check startXMLRef against DOCTYPE root element type. This is used when validating from something other than the root, but still wants to treat the starting element as root |
| checkHasDTD | if startXMLRef has no DTD reference, whether it should be flagged as an error. Set this flag to kFalse, and XML without DTD will also "pass" the validation |
| virtual bool16 IXMLValidator::Validated | ( | | ) | const |
| pure virtual |