OTX Reference  
OpenTestSystem.Otx.Extensions.XML.Terms.CreateXmlElement Class Reference

Creates a new XmlElement. More...

Inheritance diagram for OpenTestSystem.Otx.Extensions.XML.Terms.CreateXmlElement:
Inheritance graph

Public Attributes

MapTerm attributes
 Cardinality [0..1]
Contains a map of name/value pairs representing the attributes of the xml element. The attribute order is not specified. The name can contain an arbitrary namespace in form of "Namespace:Name". More...
 
StringTerm name
 Cardinality [1]
Name of an XML element. The value can contain an arbitrary namespace in form of "Namespace:Name". More...
 
StringTerm text
 Cardinality [0..1]
String representation of the text of an xml element. More...
 
- Public Attributes inherited from OpenTestSystem.Otx.Core.Terms.Term
MetaData metaData
 Cardinality [0..1]
The MetaData type allows tools to store additional, mainly tool-specific data. More...
 

Detailed Description

Creates a new XmlElement.

The CreateXmlElement activity creates a new XmlElement. Special characters '<', '>' and '&' shall be escaped.

Checker rules
CheckerRule.Xml_Chk002 - type-safe CreateXmlElement
Exceptions
Exceptions.XmlChangeExceptionIf the element name or an attribute name is invalid.
Syntax
XmlElementTerm = Xml.CreateXmlElement(StringTerm name, StringTerm text = "", MapTerm attributes = NULL);
StringTerm name
Cardinality [1] Name of an XML element. The value can contain an arbitrary namespace in form of "Name...
Definition: XML.cs:1871
StringTerm text
Cardinality [0..1] String representation of the text of an xml element.
Definition: XML.cs:1881
MapTerm attributes
Cardinality [0..1] Contains a map of name/value pairs representing the attributes of the xml element....
Definition: XML.cs:1891
Examples
// Local Declarations
Xml.XmlElement XmlElement1;
// Flow
XmlElement1 = Xml.CreateXmlElement("root", "text", {"attr":"val"});

Member Data Documentation

◆ attributes

MapTerm OpenTestSystem.Otx.Extensions.XML.Terms.CreateXmlElement.attributes

Cardinality [0..1]
Contains a map of name/value pairs representing the attributes of the xml element. The attribute order is not specified. The name can contain an arbitrary namespace in form of "Namespace:Name".

◆ name

StringTerm OpenTestSystem.Otx.Extensions.XML.Terms.CreateXmlElement.name

Cardinality [1]
Name of an XML element. The value can contain an arbitrary namespace in form of "Namespace:Name".

◆ text

StringTerm OpenTestSystem.Otx.Extensions.XML.Terms.CreateXmlElement.text

Cardinality [0..1]
String representation of the text of an xml element.