OpenXmlValidator.Validate Method (OpenXmlPart)
Validates the specified content in the OpenXmlPart.
Namespace: DocumentFormat.OpenXml.Validation
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'Declaration
Public Function Validate ( _
openXmlPart As OpenXmlPart _
) As IEnumerable(Of ValidationErrorInfo)
'Usage
Dim instance As OpenXmlValidator
Dim openXmlPart As OpenXmlPart
Dim returnValue As IEnumerable(Of ValidationErrorInfo)
returnValue = instance.Validate(openXmlPart)
public IEnumerable<ValidationErrorInfo> Validate(
OpenXmlPart openXmlPart
)
Parameters
- openXmlPart
Type: DocumentFormat.OpenXml.Packaging.OpenXmlPart
The target OpenXmlPart.
Return Value
Type: System.Collections.Generic.IEnumerable<ValidationErrorInfo>
A set of validation erros.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown when the "openXmlPart" parameter is null. |
InvalidOperationException | Throw when the specified part is not a defined part in the specified FileFormat version. |