OpenXmlPart.ValidateXml Method (String, ValidationEventHandler)
NOTE: This API is now obsolete.
Validate the xml content of the part according the specified schema.
Namespace: DocumentFormat.OpenXml.Packaging
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'宣言
<ObsoleteAttribute("This functionality is obsolete and will be removed from future version release. Please see OpenXmlValidator class for supported validation functionality.", _
False)> _
Public Sub ValidateXml ( _
schemaFile As String, _
validationEventHandler As ValidationEventHandler _
)
'使用
Dim instance As OpenXmlPart
Dim schemaFile As String
Dim validationEventHandler As ValidationEventHandler
instance.ValidateXml(schemaFile, validationEventHandler)
[ObsoleteAttribute("This functionality is obsolete and will be removed from future version release. Please see OpenXmlValidator class for supported validation functionality.",
false)]
public void ValidateXml(
string schemaFile,
ValidationEventHandler validationEventHandler
)
Parameters
- schemaFile
Type: System.String
The XML schema to be used.
- validationEventHandler
Type: System.Xml.Schema.ValidationEventHandler
ValidationEventHandler for validation events.