Difference between revisions of "Extensions.Xml.SetXmlElementText"

From emotive
Jump to navigation Jump to search
(Created page with "{{DISPLAYTITLE:OTX '''SetXmlElementText'''}}Category:Xml == Classification == {{ClassificationActivity | SetXmlElementText | UPDATING... | Action | Extensions.Xml|OT...")
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{DISPLAYTITLE:OTX '''SetXmlElementText'''}}[[Category:Xml]]
 
{{DISPLAYTITLE:OTX '''SetXmlElementText'''}}[[Category:Xml]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | SetXmlElementText | UPDATING... | [[Action]] | [[Extensions.Xml|OTX Xml extension]] | UPDATING... | UPDATING... | UPDATING... }}
+
{{ClassificationActivity | SetXmlElementText| Sets the text of an '''XmlElement'''.| [[Action]] | [[Extensions.Xml|OTX Xml extension]] |[[Extensions.Xml#Actions|Xml related Actions]] | - | - |}}
  
 
== OTL Syntax ==
 
== OTL Syntax ==
UPDATING...<!--
 
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
DiagCom.CloseComChannel(ComChannelVariable);
+
Xml.SetXmlElementText(XmlElementTerm element, StringTerm text);
 
</syntaxhighlight>
 
</syntaxhighlight>
-->
 
  
 
== Description ==
 
== Description ==
UPDATING...<!--
+
The '''SetXmlElementText''' action is used to set the text of an '''XmlElement'''. Existing text will be overwritten. Special characters '<', '>' and '&' shall be escaped.
OTX CloseComChannel activity is used for the [[Diagnosis Runtime System]] to announce that an open communication channel that all relevant resources can be released and closed.
 
{{ComChannelMemoryUsageNote}}
 
{{Important|Please note that the use of a shared '''ComChannel''' can bring the OTX runtime system in an undefined state and that is this case is not validated at design time!}}
 
-->
 
  
 
== Properties ==
 
== Properties ==
UPDATING...<!--
 
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie1| ComChannel | [[Extensions.DiagCom.ComChannel|ComChannel]] | [[Variable]] | - | [1] | Communication Channel (Control unit).}}
+
{{TableRowPropertie1| Element| [[Extensions.Xml.XmlElement|XmlElement]] | [[Term]] | - |[1..1]| The '''XmlElement''' object, to which the operation is applied.}}
 +
{{TableRowPropertie2| Text| [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [1..1] | Contains the text of the '''XML''' element.}}
 
|}
 
|}
-->
 
  
 
== OTL Examples ==
 
== OTL Examples ==
UPDATING...<!--
 
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
DiagCom.ComChannel myComCannel;
+
/// Local Declarations
  
myComCannel = DiagCom.GetComChannel("DiagnosticsCan_ECU_1", null, false);
+
Xml.XmlElement XmlElement1;
 +
 +
/// Flow
  
// Code example using the variable myComChannel
+
XmlElement1 = Xml.CreateXmlElement("root");
// ...
+
Xml.SetXmlElementText(XmlElement1, "def");
DiagCom.CloseComChannel(myComCannel);</syntaxhighlight>
 
 
</syntaxhighlight>
 
</syntaxhighlight>
-->
 
  
 
== See also ==
 
== See also ==
UPDATING...
+
[[Extensions.Xml.AddXmlChildElement|AddXmlChildElement]]<br/>
 +
[[Extensions.Xml.DeleteXmlAttribute|DeleteXmlAttribute]]<br/>
 +
[[Extensions.Xml.DeleteXmlChildElement|DeleteXmlChildElement]]<br/>
 +
[[Extensions.Xml.SetXmlComment|SetXmlComment]]<br/>
 +
[[Extensions.Xml.SetXmlElementAttribute|SetXmlElementAttribute]]<br/>
 +
[[Extensions.Xml.SetXmlElementAttributes|SetXmlElementAttributes]]<br/>
 +
<!--[[Extensions.Xml.SetXmlElementText|SetXmlElementText]]<br/>-->
 +
[[Extensions.Xml.SetXmlProcessingInstructions|SetXmlProcessingInstructions]]<br/>
 +
[[Extensions.Xml.ValidateXml|ValidateXml]]<br/>
 +
[[Extensions.Xml.XmlSaveToFile|XmlSaveToFile]]

Latest revision as of 05:42, 8 November 2018

Classification

Name SetXmlElementText
Short Description Sets the text of an XmlElement.
Class Action
Extension OTX Xml extension
Group Xml related Actions
Exceptions -
Checker Rules -
Standard Compliant Yes

OTL Syntax

Xml.SetXmlElementText(XmlElementTerm element, StringTerm text);

Description

The SetXmlElementText action is used to set the text of an XmlElement. Existing text will be overwritten. Special characters '<', '>' and '&' shall be escaped.

Properties

Name Data Type Class Default Cardinality Description
Element XmlElement Term - [1..1] The XmlElement object, to which the operation is applied.
Text String Term - [1..1] Contains the text of the XML element.

OTL Examples

/// Local Declarations

Xml.XmlElement XmlElement1;
		
/// Flow

XmlElement1 = Xml.CreateXmlElement("root");
Xml.SetXmlElementText(XmlElement1, "def");

See also

AddXmlChildElement
DeleteXmlAttribute
DeleteXmlChildElement
SetXmlComment
SetXmlElementAttribute
SetXmlElementAttributes
SetXmlProcessingInstructions
ValidateXml
XmlSaveToFile