Difference between revisions of "Extensions.Xml.CreateXmlElement"

From emotive
Jump to navigation Jump to search
Line 5: Line 5:
 
== OTL Syntax ==
 
== OTL Syntax ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
XmlElementTerm = Xml.CreateXmlElement(StringTerm, StringTerm, MapTerm);
+
/// Local Declarations
 +
Xml.XmlElement XmlElementVariable;
 +
/// Flow
 +
XmlElementVariable = Xml.CreateXmlElement(StringTerm, StringTerm, MapTerm);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 23: Line 26:
 
== OTL Examples ==
 
== OTL Examples ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 +
/// Local Declarations
 +
 
Xml.XmlElement XmlElement1;
 
Xml.XmlElement XmlElement1;
 
 

Revision as of 10:25, 25 October 2018

Classification

Name CreateXmlElement
Short Description Creates a new XmlElement.
Class Term
Extension OTX Xml extension
Group Xml related Terms
Exceptions -
Checker Rules Xml_Chk002
Standard Compliant Yes

OTL Syntax

/// Local Declarations
Xml.XmlElement XmlElementVariable;
/// Flow
XmlElementVariable = Xml.CreateXmlElement(StringTerm, StringTerm, MapTerm);

Description

The CreateXmlElement term is used to create a new XmlElement. Special characters '<', '>' and '&' shall be escaped.

Return Value

The Term returns the value, see table below.

Icons Note.png In OTX, Terms are categorized according to its return data type!
Data Type Description
XmlElement The new XmlElement.

Properties

Name Data Type Class Default Cardinality Description
Attributes Map Term - [0..1] Contains a map of name<string>/value<string> pairs representing the attributes of the XML element. The attribute order is not specified. The name can contain an arbitrary namespace in form of "Prefix:Name".
Name String Term - [1..1] The name of an XML element. The value can contain an arbitrary namespace in form of "Prefix:Name".
Text String Term - [0..1] The string representation of the text of an XML element.

OTL Examples

/// Local Declarations

Xml.XmlElement XmlElement1;
		
/// Flow

XmlElement1 = Xml.CreateXmlElement("root", "text", {"attr":"val"});

See also

CopyXmlElement
CreateXmlDocument
GetXmlElementAttributes
GetXmlElementChildElements
GetXmlElementName
GetXmlElementsByXPath
GetXmlElementText
GetXmlRootElement
XmlFromByteField
XmlLoadFromFile
XmlToByteField