Difference between revisions of "Extensions.Xml.SetXmlComment"
Jump to navigation
Jump to search
(Created page with "{{DISPLAYTITLE:OTX '''SetXmlComment'''}}Category:Xml == Classification == {{ClassificationActivity | SetXmlComment | UPDATING... | Action | Extensions.Xml|OTX Xml ex...") |
|||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:OTX '''SetXmlComment'''}}[[Category:Xml]] | {{DISPLAYTITLE:OTX '''SetXmlComment'''}}[[Category:Xml]] | ||
== Classification == | == Classification == | ||
− | {{ClassificationActivity | SetXmlComment | | + | {{ClassificationActivity | SetXmlComment| Sets a comment above the root '''XmlElement'''.| [[Action]] | [[Extensions.Xml|OTX Xml extension]] |[[Extensions.Xml#Actions|Xml related Actions]] | - | -|}} |
== OTL Syntax == | == OTL Syntax == | ||
− | |||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | + | Xml.SetXmlComment(XmlDocumentTerm, StringTerm, BooleanTerm); | |
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
== Description == | == Description == | ||
− | + | The '''SetXmlComment''' action is used to set a new comment directly above the root '''XmlElement'''. | |
− | |||
− | |||
− | |||
− | |||
== Properties == | == Properties == | ||
− | |||
{| {{TableHeader}} | {| {{TableHeader}} | ||
{{TableRowPropertiesHeader}} | {{TableRowPropertiesHeader}} | ||
− | {{TableRowPropertie1| | + | {{TableRowPropertie2| Append| [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | [[Term]] | - | [0..1] | Boolean term, which describes if a new comment will be added or not. If it is set to FALSE, all existing comments will be deleted. Default = FALSE.}} |
+ | {{TableRowPropertie1| Comment| [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [1..1] | String representation of an '''XML''' comment. The string provided is inserted directly between the opening and closing comment marks. Sample: "comment" becomes "<!--comment-->".}} | ||
+ | {{TableRowPropertie2|Document | [[Extensions.Xml.XmlDocument|XmlDocument]] | [[Term]] | - | [1..1] |The '''XmlDocument''' object, to which the operation is applied.}} | ||
|} | |} | ||
− | |||
== 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.XmlDocument XmlDocument1; | ||
− | + | /// Flow | |
− | + | XmlElement1 = Xml.CreateXmlElement("root", "roottext"); | |
− | + | XmlDocument1 = Xml.CreateXmlDocument(XmlElement1, "1.0", @Encoding:UTF-8, false); | |
− | + | Xml.SetXmlComment(XmlDocument1, "Comment 1", false); | |
</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:38, 8 October 2018
Classification
Name | SetXmlComment |
Short Description | Sets a comment above the root XmlElement. |
Class | Action |
Extension | OTX Xml extension |
Group | Xml related Actions |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
Xml.SetXmlComment(XmlDocumentTerm, StringTerm, BooleanTerm);
Description
The SetXmlComment action is used to set a new comment directly above the root XmlElement.
Properties
Name | Data Type | Class | Default | Cardinality | Description |
Append | Boolean | Term | - | [0..1] | Boolean term, which describes if a new comment will be added or not. If it is set to FALSE, all existing comments will be deleted. Default = FALSE. |
Comment | String | Term | - | [1..1] | String representation of an XML comment. The string provided is inserted directly between the opening and closing comment marks. Sample: "comment" becomes "". |
Document | XmlDocument | Term | - | [1..1] | The XmlDocument object, to which the operation is applied. |
OTL Examples
Xml.XmlElement XmlElement1;
Xml.XmlDocument XmlDocument1;
/// Flow
XmlElement1 = Xml.CreateXmlElement("root", "roottext");
XmlDocument1 = Xml.CreateXmlDocument(XmlElement1, "1.0", @Encoding:UTF-8, false);
Xml.SetXmlComment(XmlDocument1, "Comment 1", false);
See also
AddXmlChildElement
DeleteXmlAttribute
DeleteXmlChildElement
SetXmlElementAttribute
SetXmlElementAttributes
SetXmlElementText
SetXmlProcessingInstructions
ValidateXml
XmlSaveToFile