C# Class Microsoft.Protocols.TestSuites.MS_WWSP.XmlValidator

A Class represent the XML schema validation function.
Exibir arquivo Open project: OfficeDev/Interop-TestSuites Class Usage Examples

Public Methods

Method Description
GenerateValidationResult ( ) : string

This method is used to generate xml validation result information by using the record errors and warnings.

ValidateXml ( List schemaList, string xmlString ) : ValidationResult

Validate a piece of Xml fragment according the given Xml Schema. Both Xml Schema and Xml fragment are String type.

Private Methods

Method Description
GetTargetNamespace ( string fullSchema ) : string

This method is used to get the target namespace from a schema string.

ValidationCallBack ( object sender, ValidationEventArgs args ) : void

This method is a callback function which is used to record the schema validation errors and warnings.

Method Details

GenerateValidationResult() public static method

This method is used to generate xml validation result information by using the record errors and warnings.
public static GenerateValidationResult ( ) : string
return string

ValidateXml() public static method

Validate a piece of Xml fragment according the given Xml Schema. Both Xml Schema and Xml fragment are String type.
public static ValidateXml ( List schemaList, string xmlString ) : ValidationResult
schemaList List Xml Schema string.
xmlString string Xml fragment string.
return ValidationResult