Difference between revisions of "Extensions.Xml.CreateXmlDocument"

From emotive
Jump to navigation Jump to search
(Created page with "{{DISPLAYTITLE:OTX '''CreateXmlDocument'''}}Category:Xml == Classification == {{ClassificationActivity | CreateXmlDocument | UPDATING... | Term | Extensions.Xml|OTX...")
 
Line 1: Line 1:
 
{{DISPLAYTITLE:OTX '''CreateXmlDocument'''}}[[Category:Xml]]
 
{{DISPLAYTITLE:OTX '''CreateXmlDocument'''}}[[Category:Xml]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | CreateXmlDocument | UPDATING... | [[Term]] | [[Extensions.Xml|OTX Xml extension]] | UPDATING... | UPDATING... | UPDATING... }}
+
{{ClassificationActivity | CreateXmlDocument|Creates an '''XmlDocument'''| [[Term]] | [[Extensions.Xml|OTX Xml extension]] |[[Extensions.Xml#Terms|Xml related Terms]] | [[Extensions.Xml.XmlFormatException|XmlFormatException]] | - |}}
  
 
== OTL Syntax ==
 
== OTL Syntax ==
UPDATING...<!--
 
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
DiagCom.CloseComChannel(ComChannelVariable);
+
XmlDocumentTerm = Xml.CreateXmlDocument(XmlElementTerm, StringTerm, EncodingTerm, BooleanTerm);
 
</syntaxhighlight>
 
</syntaxhighlight>
-->
 
  
 
== Description ==
 
== Description ==
UPDATING...<!--
+
The '''CreateXmlDocument''' term is used to create an '''XmlDocument''' from an XMLElementTerm.
OTX CloseComChannel activity is used for the [[Diagnosis Runtime System]] to announce that an open communication channel that all relevant resources can be released and closed.
+
 
{{ComChannelMemoryUsageNote}}
+
{{TermReturnValue| [[Extensions.Xml.XmlDocument|XmlDocument]] | The XmlDocument is created from an XMLElementTerm.}}
{{Important|Please note that the use of a shared '''ComChannel''' can bring the OTX runtime system in an undefined state and that is this case is not validated at design time!}}
 
-->
 
  
 
== Properties ==
 
== Properties ==
UPDATING...<!--
 
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie1| ComChannel | [[Extensions.DiagCom.ComChannel|ComChannel]] | [[Variable]] | - | [1] | Communication Channel (Control unit).}}
+
{{TableRowPropertie1| Encoding|[[Extensions.StringUtil.Encoding|Encoding]] | [[Term]] | @Encoding:UTF-8 |[0..1]| Optional encoding of the '''XML''' document. If an invalid encoding (BIN, OCT, HEX) is specified, an [[Extensions.Xml.XmlFormatException|'''XmlFormatException''']] shall be thrown.}}
 +
{{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.}}
 +
{{TableRowPropertie2| Version|[[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | "1.0" |[0..1]| The optional XML version.}}
 
|}
 
|}
-->
 
  
 
== OTL Examples ==
 
== OTL Examples ==
UPDATING...<!--
 
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
DiagCom.ComChannel myComCannel;
+
Xml.XmlElement XmlElement1;
 
+
Xml.XmlDocument XmlDocument1;
myComCannel = DiagCom.GetComChannel("DiagnosticsCan_ECU_1", null, false);
+
 +
/// Flow
  
// Code example using the variable myComChannel
+
XmlElement1 = Xml.CreateXmlElement("root");
// ...
+
XmlDocument1 = Xml.CreateXmlDocument(XmlElement1, "1.0", @Encoding:UTF-8, false);
DiagCom.CloseComChannel(myComCannel);</syntaxhighlight>
 
 
</syntaxhighlight>
 
</syntaxhighlight>
-->
 
  
 
== See also ==
 
== See also ==
UPDATING...
+
[[Extensions.Xml.CopyXmlElement|CopyXmlElement]]<br/>
 +
<!--[[Extensions.Xml.CreateXmlDocument|CreateXmlDocument]]<br/>-->
 +
[[Extensions.Xml.CreateXmlElement|CreateXmlElement]]<br/>
 +
[[Extensions.Xml.GetXmlElementAttributes|GetXmlElementAttributes]]<br/>
 +
[[Extensions.Xml.GetXmlElementChildElements|GetXmlElementChildElements]]<br/>
 +
[[Extensions.Xml.GetXmlElementName|GetXmlElementName]]<br/>
 +
[[Extensions.Xml.GetXmlElementsByXPath|GetXmlElementsByXPath]]<br/>
 +
[[Extensions.Xml.GetXmlElementText|GetXmlElementText]]<br/>
 +
[[Extensions.Xml.GetXmlRootElement|GetXmlRootElement]]<br/>
 +
[[Extensions.Xml.XmlFromByteField|XmlFromByteField]]<br/>
 +
[[Extensions.Xml.XmlLoadFromFile|XmlLoadFromFile]]<br/>
 +
[[Extensions.Xml.XmlToByteField|XmlToByteField]]<br/>

Revision as of 10:53, 8 October 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, StringTerm, EncodingTerm, BooleanTerm);

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

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