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