Difference between revisions of "Extensions.Xml.CreateXmlDocument"

From emotive
Jump to navigation Jump to search
 
(2 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;">
XmlDocumentTerm = Xml.CreateXmlDocument(XmlElementTerm, StringTerm, EncodingTerm, BooleanTerm);
+
XmlDocumentTerm Xml.CreateXmlDocument(XmlElementTerm rootNode, StringTerm version, EncodingTerm encoding, BooleanTerm standalone);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 19: Line 19:
 
{{TableRowPropertie2|RootNode|[[Extensions.Xml.XmlElement|XmlElement]] | [[Term]] | - |[1..1]| Assignment of a root node term, which will be included in the document.}}
 
{{TableRowPropertie2|RootNode|[[Extensions.Xml.XmlElement|XmlElement]] | [[Term]] | - |[1..1]| Assignment of a root node term, which will be included in the document.}}
 
{{TableRowPropertie1| Standalone|[[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | [[Term]] | FALSE |[0..1]| The optional standalone attribute of an '''XML''' declaration.}}
 
{{TableRowPropertie1| Standalone|[[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | [[Term]] | FALSE |[0..1]| The optional standalone attribute of an '''XML''' declaration.}}
{{TableRowPropertie2| Version|[[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | "1.0" |[0..1]| The optional XML version.}}
+
{{TableRowPropertie2| Version|[[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | "1.0" |[0..1]| The optional '''XML''' version.}}
 
|}
 
|}
  
 
== 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;
 
Xml.XmlDocument XmlDocument1;
 
Xml.XmlDocument XmlDocument1;

Latest revision as of 05:49, 8 November 2018

Classification

Name CreateXmlDocument
Short Description Creates an XmlDocument
Class Term
Extension OTX Xml extension
Group Xml related Terms
Exceptions XmlFormatException
Checker Rules -
Standard Compliant Yes

OTL Syntax

XmlDocumentTerm Xml.CreateXmlDocument(XmlElementTerm rootNode, StringTerm version, EncodingTerm encoding, BooleanTerm standalone);

Description

The CreateXmlDocument term is used to create an XmlDocument from an XMLElementTerm.

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
XmlDocument The XmlDocument is created from an XMLElementTerm.

Properties

Name Data Type Class Default Cardinality Description
Encoding Encoding Term @Encoding:UTF-8 [0..1] Optional encoding of the XML document. If an invalid encoding (BIN, OCT, HEX) is specified, an XmlFormatException shall be thrown.
RootNode XmlElement Term - [1..1] Assignment of a root node term, which will be included in the document.
Standalone Boolean Term FALSE [0..1] The optional standalone attribute of an XML declaration.
Version String Term "1.0" [0..1] The optional XML version.

OTL Examples

/// Local Declarations

Xml.XmlElement XmlElement1;
Xml.XmlDocument XmlDocument1;
		
/// Flow

XmlElement1 = Xml.CreateXmlElement("root");
XmlDocument1 = Xml.CreateXmlDocument(XmlElement1, "1.0", @Encoding:UTF-8, false);

See also

CopyXmlElement
CreateXmlElement
GetXmlElementAttributes
GetXmlElementChildElements
GetXmlElementName
GetXmlElementsByXPath
GetXmlElementText
GetXmlRootElement
XmlFromByteField
XmlLoadFromFile
XmlToByteField