Compartir a través de


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

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.

See Also

Reference

OpenXmlValidator Class

OpenXmlValidator Members

Validate Overload

DocumentFormat.OpenXml.Validation Namespace