Difference between revisions of "Extensions.Xml.XmlToByteField"

From emotive
Jump to navigation Jump to search
(Created page with "{{DISPLAYTITLE:OTX '''XmlToByteField'''}}Category:Xml == Classification == {{ClassificationActivity | XmlToByteField | UPDATING... | Term | Extensions.Xml|OTX Xml ex...")
 
Line 1: Line 1:
 
{{DISPLAYTITLE:OTX '''XmlToByteField'''}}[[Category:Xml]]
 
{{DISPLAYTITLE:OTX '''XmlToByteField'''}}[[Category:Xml]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | XmlToByteField | UPDATING... | [[Term]] | [[Extensions.Xml|OTX Xml extension]] | UPDATING... | UPDATING... | UPDATING... }}
+
{{ClassificationActivity | XmlToByteField|Returns a ByteField from an '''XmlDocument'''.| [[Term]] | [[Extensions.Xml|OTX Xml extension]] |[[Extensions.Xml#Terms|Xml related Terms]] | - | - |}}
  
 
== 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);
+
ByteFieldTerm = Xml.XmlToByteField(XmlDocumentTerm);
 
</syntaxhighlight>
 
</syntaxhighlight>
-->
 
  
 
== Description ==
 
== Description ==
UPDATING...<!--
+
The '''XmlToByteField''' term returns a ByteField from an '''XmlDocument'''.  
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}}
+
The document is serialized using its encoding. The resulting ByteField shall contain the byte representation of a prolog which specifies the character encoding and '''XML''' version.
{{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!}}
+
 
-->
+
For encodings which require a byte-order mark (BOM), such as UTF-16, a BOM shall be inserted before the prolog. For other encodings, it is unspecified whether a BOM will be inserted.
 +
 
 +
{{TermReturnValue|[[Core.DataTypes.ComplexDataType.ByteField|ByteField]]| The ByteField from an '''XmlDocument'''.}}
  
 
== Properties ==
 
== Properties ==
UPDATING...<!--
 
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie1| ComChannel | [[Extensions.DiagCom.ComChannel|ComChannel]] | [[Variable]] | - | [1] | Communication Channel (Control unit).}}
+
{{TableRowPropertie2| Document|[[Extensions.Xml.XmlDocument|XmlDocument]] | [[Term]] | - |[1..1]| The '''XmlDocument''' object, to which the operation is applied.}}
 
|}
 
|}
-->
 
  
 
== 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.XmlDocument XmlDocument1;
 +
ByteField ByteField1;
  
myComCannel = DiagCom.GetComChannel("DiagnosticsCan_ECU_1", null, false);
+
/// Flow
  
// Code example using the variable myComChannel
+
XmlDocument1 = Xml.XmlLoadFromFile("XmlStorage/XmlToByteField.xml", @Encoding:UTF-8);
// ...
+
ByteField1 = Xml.XmlToByteField(XmlDocument1);
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 03:41, 10 October 2018

Classification

Name XmlToByteField
Short Description Returns a ByteField from an XmlDocument.
Class Term
Extension OTX Xml extension
Group Xml related Terms
Exceptions -
Checker Rules -
Standard Compliant Yes

OTL Syntax

ByteFieldTerm = Xml.XmlToByteField(XmlDocumentTerm);

Description

The XmlToByteField term returns a ByteField from an XmlDocument.

The document is serialized using its encoding. The resulting ByteField shall contain the byte representation of a prolog which specifies the character encoding and XML version.

For encodings which require a byte-order mark (BOM), such as UTF-16, a BOM shall be inserted before the prolog. For other encodings, it is unspecified whether a BOM will be inserted.

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
ByteField The ByteField from an XmlDocument.

Properties

Name Data Type Class Default Cardinality Description
Document XmlDocument Term - [1..1] The XmlDocument object, to which the operation is applied.

OTL Examples

Xml.XmlDocument XmlDocument1;
ByteField ByteField1;

/// Flow

XmlDocument1 = Xml.XmlLoadFromFile("XmlStorage/XmlToByteField.xml", @Encoding:UTF-8);
ByteField1 = Xml.XmlToByteField(XmlDocument1);

See also

CopyXmlElement
CreateXmlDocument
CreateXmlElement
GetXmlElementAttributes
GetXmlElementChildElements
GetXmlElementName
GetXmlElementsByXPath
GetXmlElementText
GetXmlRootElement
XmlFromByteField
XmlLoadFromFile