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

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

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

Public Attributes

ByteFieldTerm byteField
 Cardinality [1]
The ByteField that contains the XML data. More...
 
StringVariable errorMessages
 Cardinality [0..1]
Error message if errors occurred during the validation. More...
 
EncodingTerm fallbackEncoding
 Cardinality [0..1]
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 by the prolog or BOM, the <fallbackEncoding> shall be ignored. If an invalid encoding (BIN, OCT, HEX) is specified, an XmlFormatException shall be thrown. More...
 
BooleanVariable isValid
 Cardinality [1]
A variable indicating whether the validation has been successfully performed or not. In the case where no schema is available, false will be returned. Additionally, an error message stating that there is no XML schema available will be returned. More...
 
- Public Attributes inherited from OpenTestSystem.Otx.Core.Actions.ActionRealisation
OtxLink validFor
 Cardinality [0..1]
Validity of ActionRealisation. More...
 

Detailed Description

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

The ValidateXMLFromByteField activity validates XML data against the XML schema file specified within the XML document. The path shall be defined by a URI(see ISO 13209-2:2022, Annex F).

Exceptions
Exceptions.XmlFormatExceptionIf an invalid encoding (BIN, OCT, HEX) is specified, or if one of the referenced schema files is not a valid XML schema.
Syntax
Xml.ValidateXMLFromByteField(ByteFieldTerm byteField, BooleanVariable isValid, StringVariable errorMessages = NULL, EncodingTerm fallbackEncoding = @Encoding:UTF-8);
Examples

Member Data Documentation

◆ byteField

ByteFieldTerm OpenTestSystem.Otx.Extensions.XML.Actions.ValidateXMLFromByteField.byteField

Cardinality [1]
The ByteField that contains the XML data.

◆ errorMessages

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

Cardinality [0..1]
Error message if errors occurred during the validation.

◆ fallbackEncoding

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

Cardinality [0..1]
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 by the prolog or BOM, the <fallbackEncoding> shall be ignored. If an invalid encoding (BIN, OCT, HEX) is specified, an XmlFormatException shall be thrown.

◆ isValid

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

Cardinality [1]
A variable indicating whether the validation has been successfully performed or not. In the case where no schema is available, false will be returned. Additionally, an error message stating that there is no XML schema available will be returned.

OpenTestSystem.Otx.Extensions.XML.Actions.ValidateXMLFromByteField.errorMessages
StringVariable errorMessages
Cardinality [0..1] Error message if errors occurred during the validation.
Definition: XML.cs:531
OpenTestSystem.Otx.Extensions.XML.Actions.ValidateXMLFromByteField.isValid
BooleanVariable isValid
Cardinality [1] A variable indicating whether the validation has been successfully performed or not....
Definition: XML.cs:521
OpenTestSystem.Otx.Extensions.XML.Actions.ValidateXMLFromByteField.byteField
ByteFieldTerm byteField
Cardinality [1] The ByteField that contains the XML data.
Definition: XML.cs:511
OpenTestSystem.Otx.Extensions.XML.Actions.ValidateXMLFromByteField.fallbackEncoding
EncodingTerm fallbackEncoding
Cardinality [0..1] Optional encoding value of the XML document (Default = "UTF-8"),...
Definition: XML.cs:541