Extensions.Xml.SetXmlElementAttribute
Jump to navigation
Jump to search
Classification
Name | SetXmlElementAttribute |
Short Description | Sets an attribute on an XmlElement. |
Class | Action |
Extension | OTX Xml extension |
Group | Xml related Actions |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
Xml.SetXmlElementAttribute(XmlElementTerm element, StringTerm name, StringTerm value);
Description
The SetXmlElementAttribute action is used to set an attribute on an XmlElement by name. Any existing attribute with the same name will be overwritten.
Properties
Name | Data Type | Class | Default | Cardinality | Description |
Element | XmlElement | Term | - | [1..1] | Represents the XmlElement that contains the attribute. |
Name | String | Term | - | [1..1] | The name of the attribute. The value can contain an arbitrary namespace in form of "Prefix:Name". |
Value | String | Term | - | [1..1] | The new value of the attribute. |
OTL Examples
/// Local Declarations
Xml.XmlElement XmlElement1;
/// Flow
XmlElement1 = Xml.CreateXmlElement("root", "text");
Xml.SetXmlElementAttribute(XmlElement1, "attr", "newval");
See also
AddXmlChildElement
DeleteXmlAttribute
DeleteXmlChildElement
SetXmlComment
SetXmlElementAttributes
SetXmlElementText
SetXmlProcessingInstructions
ValidateXml
XmlSaveToFile