Difference between revisions of "Extensions.Xml.DeleteXmlChildElement"

From emotive
Jump to navigation Jump to search
(Created page with "{{DISPLAYTITLE:OTX '''DeleteXmlChildElement'''}}Category:Xml == Classification == {{ClassificationActivity | DeleteXmlChildElement | UPDATING... | Action | Extension...")
 
Line 1: Line 1:
 
{{DISPLAYTITLE:OTX '''DeleteXmlChildElement'''}}[[Category:Xml]]
 
{{DISPLAYTITLE:OTX '''DeleteXmlChildElement'''}}[[Category:Xml]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | DeleteXmlChildElement | UPDATING... | [[Action]] | [[Extensions.Xml|OTX Xml extension]] | UPDATING... | UPDATING... | UPDATING... }}
+
{{ClassificationActivity | DeleteXmlChildElement| Deletes the connection of the given element from its parent | [[Action]] | [[Extensions.Xml|OTX Xml extension]] |[[Extensions.Xml#Actions|Xml related Actions]] | [[Extensions.Xml.XmlChangeException|XmlChangeException]]| -|}}
  
 
== 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.DeleteXmlChildElement(XmlElementTerm, XmlElementTerm);
 
</syntaxhighlight>
 
</syntaxhighlight>
-->
 
  
 
== Description ==
 
== Description ==
UPDATING...<!--
+
The '''DeleteXmlChildElement''' action is used to delete the connection of the given element from its parent. If the given child element is not a child of the given parent, the [[Extensions.Xml.XmlException|'''XmlException''']] shall be thrown and no deletion shall take place. After deleting the connection, the child element can be reused in the same way as a new element.
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| Child| [[Extensions.Xml.XmlElement|XmlElement]] | [[Term]] | - | [1..1] | The element which should be deleted.}}
 +
{{TableRowPropertie2| Parent| [[Extensions.Xml.XmlElement|XmlElement]] | [[Term]] | - | [1..1] | The element which contains the element to be deleted.}}
 
|}
 
|}
-->
 
  
 
== 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;
+
Xml.XmlElement XmlElement1;
 +
Xml.XmlElement XmlElement2;
  
myComCannel = DiagCom.GetComChannel("DiagnosticsCan_ECU_1", null, false);
+
/// Flow
  
// Code example using the variable myComChannel
+
XmlElement1 = Xml.CreateXmlElement("root", "xyz");
// ...
+
XmlElement2 = Xml.CreateXmlElement("child");
DiagCom.CloseComChannel(myComCannel);</syntaxhighlight>
+
Xml.AddXmlChildElement(XmlElement1, XmlElement2);
 +
Xml.DeleteXmlChildElement(XmlElement1, XmlElement2);
 
</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]]

Revision as of 07:05, 8 October 2018

Classification

Name DeleteXmlChildElement
Short Description Deletes the connection of the given element from its parent
Class Action
Extension OTX Xml extension
Group Xml related Actions
Exceptions XmlChangeException
Checker Rules -
Standard Compliant Yes

OTL Syntax

Xml.DeleteXmlChildElement(XmlElementTerm, XmlElementTerm);

Description

The DeleteXmlChildElement action is used to delete the connection of the given element from its parent. If the given child element is not a child of the given parent, the XmlException shall be thrown and no deletion shall take place. After deleting the connection, the child element can be reused in the same way as a new element.

Properties

Name Data Type Class Default Cardinality Description
Child XmlElement Term - [1..1] The element which should be deleted.
Parent XmlElement Term - [1..1] The element which contains the element to be deleted.

OTL Examples

Xml.XmlElement XmlElement1;
Xml.XmlElement XmlElement2;

/// Flow

XmlElement1 = Xml.CreateXmlElement("root", "xyz");
XmlElement2 = Xml.CreateXmlElement("child");
Xml.AddXmlChildElement(XmlElement1, XmlElement2);
Xml.DeleteXmlChildElement(XmlElement1, XmlElement2);

See also

AddXmlChildElement
DeleteXmlAttribute
SetXmlComment
SetXmlElementAttribute
SetXmlElementAttributes
SetXmlElementText
SetXmlProcessingInstructions
ValidateXml
XmlSaveToFile