OTX Reference  
OpenTestSystem.Otx.Extensions.XML.Actions.ValidateXml Class Reference

Validates an XML document against the XML schema file specified within the XML document. More...

Inheritance diagram for OpenTestSystem.Otx.Extensions.XML.Actions.ValidateXml:
Inheritance graph

Public Attributes

StringVariable errorMessages
 Error message if errors occurred during the validation. More...
 
EncodingTerm fallbackEncoding
 Optional encoding value of the XML document (Default = "UTF-8"), if no encoding is described in the XML prolog or byte order mark (BOM). If the encoding is defined in the prolog this value should be ignored. If an invalid encoding (BIN, OCT, HEX) is specified, an XmlFormatException shall be thrown. More...
 
BooleanVariable isValid
 Variable indicating whether the validation has been successfully performed or not. In case no schema is available false will returned, with the error message stating that there is no XML schema available. More...
 
StringTerm path
 The path of XmlDocument. More...
 
- Public Attributes inherited from OpenTestSystem.Otx.Core.Actions.ActionRealisation
OtxLink validFor
 Validity of ActionRealisation. More...
 

Detailed Description

Validates an XML document against the XML schema file specified within the XML document.

The ValidateXml activity validates an XML document against the XML schema file specified within the XML document.

Exceptions
Core.Exceptions.InvalidReferenceException
Exceptions.XmlFormatException
Syntax
Xml.ValidateXml(StringTerm path, BooleanVariable isValid, StringVariable errorMessages, EncodingTerm fallbackEncoding);
EncodingTerm fallbackEncoding
Optional encoding value of the XML document (Default = "UTF-8"), if no encoding is described in the X...
Definition: XML.cs:459
StringTerm path
The path of XmlDocument.
Definition: XML.cs:429
StringVariable errorMessages
Error message if errors occurred during the validation.
Definition: XML.cs:449
BooleanVariable isValid
Variable indicating whether the validation has been successfully performed or not....
Definition: XML.cs:439
Examples
// Local Declarations
Boolean IsValid1 = false;
String ErrorMessages1 = "";
// Flow
Xml.ValidateXml("XmlStorage/ValidateXml_TC01.xml", IsValid1, ErrorMessages1, @Encoding:UTF-8);

Member Data Documentation

◆ errorMessages

StringVariable OpenTestSystem.Otx.Extensions.XML.Actions.ValidateXml.errorMessages

Error message if errors occurred during the validation.

◆ fallbackEncoding

EncodingTerm OpenTestSystem.Otx.Extensions.XML.Actions.ValidateXml.fallbackEncoding

Optional encoding value of the XML document (Default = "UTF-8"), if no encoding is described in the XML prolog or byte order mark (BOM). If the encoding is defined in the prolog this value should be ignored. If an invalid encoding (BIN, OCT, HEX) is specified, an XmlFormatException shall be thrown.

◆ isValid

BooleanVariable OpenTestSystem.Otx.Extensions.XML.Actions.ValidateXml.isValid

Variable indicating whether the validation has been successfully performed or not. In case no schema is available false will returned, with the error message stating that there is no XML schema available.

◆ path

StringTerm OpenTestSystem.Otx.Extensions.XML.Actions.ValidateXml.path

The path of XmlDocument.