OpenXmlValidator.Validate Method (OpenXmlPackage)
Validates the specified document.
Namespace: DocumentFormat.OpenXml.Validation
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'Declaration
Public Function Validate ( _
openXmlPackage As OpenXmlPackage _
) As IEnumerable(Of ValidationErrorInfo)
'Usage
Dim instance As OpenXmlValidator
Dim openXmlPackage As OpenXmlPackage
Dim returnValue As IEnumerable(Of ValidationErrorInfo)
returnValue = instance.Validate(openXmlPackage)
public IEnumerable<ValidationErrorInfo> Validate(
OpenXmlPackage openXmlPackage
)
Parameters
- openXmlPackage
Type: DocumentFormat.OpenXml.Packaging.OpenXmlPackage
The target WordprocessingDocument, SpreadsheetDocument or PresentationDocument.
Return Value
Type: System.Collections.Generic.IEnumerable<ValidationErrorInfo>
A set of validation erros.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown when the "openXmlPackage" parameter is null. |