Extensions.Xml.SetXmlElementAttributes
Jump to navigation
Jump to search
Classification
Name | SetXmlElementAttributes |
Short Description | Sets the attributes of an XmlElement. |
Class | Action |
Extension | OTX Xml extension |
Group | Xml related Actions |
Exceptions | - |
Checker Rules | Xml_Chk001 |
Standard Compliant | Yes |
OTL Syntax
Xml.SetXmlElementAttributes(XmlElementTerm element, MapTerm attributes);
Description
The SetXmlElementAttributes action is used to set the attributes of an XmlElement. All existing attributes will be removed. Please note that the attribute order is not specified.
Properties
Name | Data Type | Class | Default | Cardinality | Description |
Attributes | Map | Term | - | [1..1] | Contains a map of name<string>/value<string> pairs representing the attributes of the XML node. The name can contain an arbitrary namespace in form of "Prefix:Name". |
Element | XmlElement | Term | - | [1..1] | Represents the XmlElement, which should contain the given attributes. |
OTL Examples
/// Local Declarations
Xml.XmlElement XmlElement1;
/// Flow
XmlElement1 = Xml.CreateXmlElement("person2");
Xml.SetXmlElementAttributes(XmlElement1, {"gender":"male", "age":"22"});
See also
AddXmlChildElement
DeleteXmlAttribute
DeleteXmlChildElement
SetXmlComment
SetXmlElementAttribute
SetXmlElementText
SetXmlProcessingInstructions
ValidateXml
XmlSaveToFile