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

Sets an attribute on a XmlElement by name. More...

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

Public Attributes

XmlElementTerm element
 Represents the XmlElement, which the attributes contains. More...
 
StringTerm name
 Name of the attribute. The value can contain an arbitrary namespace in form of "Namespace:Name". More...
 
StringTerm value
 Value of the attribute. More...
 
- Public Attributes inherited from OpenTestSystem.Otx.Core.Actions.ActionRealisation
OtxLink validFor
 Validity of ActionRealisation. More...
 

Detailed Description

Sets an attribute on a XmlElement by name.

The SetXmlElementAttribute activity sets an attribute on a XmlElement by name. Any Existing attribute with the same name will be overwritten.

Syntax
Xml.SetXmlElementAttribute(XmlElementTerm element, StringTerm name, StringTerm value);
StringTerm name
Name of the attribute. The value can contain an arbitrary namespace in form of "Namespace:Name".
Definition: XML.cs:729
XmlElementTerm element
Represents the XmlElement, which the attributes contains.
Definition: XML.cs:719
StringTerm value
Value of the attribute.
Definition: XML.cs:739
Examples
// Local Declarations
Xml.XmlElement XmlElement1;
// Flow
XmlElement1 = Xml.CreateXmlElement("root", "text");
Xml.SetXmlElementAttribute(XmlElement1, "attr", "newval");

Member Data Documentation

◆ element

XmlElementTerm OpenTestSystem.Otx.Extensions.XML.Actions.SetXmlElementAttribute.element

Represents the XmlElement, which the attributes contains.

◆ name

StringTerm OpenTestSystem.Otx.Extensions.XML.Actions.SetXmlElementAttribute.name

Name of the attribute. The value can contain an arbitrary namespace in form of "Namespace:Name".

◆ value

StringTerm OpenTestSystem.Otx.Extensions.XML.Actions.SetXmlElementAttribute.value

Value of the attribute.