Difference between revisions of "Extensions.Xml.DeleteXmlChildElement"
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 | | + | {{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 == | ||
− | |||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | + | Xml.DeleteXmlChildElement(XmlElementTerm, XmlElementTerm); | |
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
== Description == | == 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 [[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. | |
− | |||
− | |||
− | |||
− | |||
== Properties == | == Properties == | ||
− | |||
{| {{TableHeader}} | {| {{TableHeader}} | ||
{{TableRowPropertiesHeader}} | {{TableRowPropertiesHeader}} | ||
− | {{TableRowPropertie1| | + | {{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 == | ||
− | |||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | + | Xml.XmlElement XmlElement1; | |
+ | Xml.XmlElement XmlElement2; | ||
− | + | /// Flow | |
− | + | XmlElement1 = Xml.CreateXmlElement("root", "xyz"); | |
− | + | XmlElement2 = Xml.CreateXmlElement("child"); | |
− | + | Xml.AddXmlChildElement(XmlElement1, XmlElement2); | |
+ | Xml.DeleteXmlChildElement(XmlElement1, XmlElement2); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
== See also == | == See also == | ||
− | + | [[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