Difference between revisions of "Extensions.Xml.GetXmlElementText"
Jump to navigation
Jump to search
(3 intermediate revisions by the same user not shown) | |||
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;"> | ||
− | StringTerm | + | StringTerm Xml.GetXmlElementText(XmlElementTerm eElement); |
</syntaxhighlight> | </syntaxhighlight> | ||
Line 18: | Line 18: | ||
{| {{TableHeader}} | {| {{TableHeader}} | ||
{{TableRowPropertiesHeader}} | {{TableRowPropertiesHeader}} | ||
− | {{TableRowPropertie2| | + | {{TableRowPropertie2| Element|[[Extensions.Xml.XmlElement|XmlElement]] | [[Term]] | - |[1..1]| The '''XmlElement''' 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;"> | ||
+ | /// Local Declarations | ||
+ | |||
Xml.XmlElement XmlElement1; | Xml.XmlElement XmlElement1; | ||
String String1 = ""; | String String1 = ""; |
Latest revision as of 05:58, 8 November 2018
Contents
Classification
Name | GetXmlElementText |
Short Description | Returns the text of an XML element |
Class | Term |
Extension | OTX Xml extension |
Group | Xml related Terms |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
StringTerm Xml.GetXmlElementText(XmlElementTerm eElement);
Description
The GetXmlElementText term returns the text of an XML element as a String. If no text is available an empty string is returned. Escaped special characters shall be unescaped.
If the element contains CDATA's the returned string contains the content of the CDATA section as it is. If the element contains multiple text and/or CDATA nodes, the returned String is the concatenation of all these nodes.
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
String | The text of an XML element. |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
Element | XmlElement | Term | - | [1..1] | The XmlElement object, to which the operation is applied. |
OTL Examples
/// Local Declarations
Xml.XmlElement XmlElement1;
String String1 = "";
/// Flow
XmlElement1 = Xml.CreateXmlElement("root", "abc");
String1 = Xml.GetXmlElementText(XmlElement1);
See also
CopyXmlElement
CreateXmlDocument
CreateXmlElement
GetXmlElementAttributes
GetXmlElementChildElements
GetXmlElementName
GetXmlElementsByXPath
GetXmlRootElement
XmlFromByteField
XmlLoadFromFile
XmlToByteField