Difference between revisions of "Extensions.Xml.XmlLoadFromFile"

From emotive
Jump to navigation Jump to search
(Created page with "{{DISPLAYTITLE:OTX '''XmlLoadFromFile'''}}Category:Xml == Classification == {{ClassificationActivity | XmlLoadFromFile | UPDATING... | Term | Extensions.Xml|OTX Xml...")
 
Line 1: Line 1:
 
{{DISPLAYTITLE:OTX '''XmlLoadFromFile'''}}[[Category:Xml]]
 
{{DISPLAYTITLE:OTX '''XmlLoadFromFile'''}}[[Category:Xml]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | XmlLoadFromFile | UPDATING... | [[Term]] | [[Extensions.Xml|OTX Xml extension]] | UPDATING... | UPDATING... | UPDATING... }}
+
{{ClassificationActivity | XmlLoadFromFile|Returns updating....| [[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.XmlLoadFromFile(ByteFieldTerm, EncodingTerm);
 
</syntaxhighlight>
 
</syntaxhighlight>
-->
 
  
 
== Description ==
 
== Description ==
UPDATING...<!--
+
The '''XmlLoadFromFile''' term returns an '''XmlDocument''' from a ByteField.
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''' from a ByteField.}}
{{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| ByteField|[[Core.DataTypes.ComplexDataType.ByteField|ByteField]] | [[Term]] | - |[1..1]| The ByteField that encapsulates the '''XML''' data.}}
 +
{{TableRowPropertie2| FallbackEncoding|[[Extensions.StringUtil.Encoding|Encoding]] | [[Term]] | @Encoding:UTF-8 |[0..1]| Optional encoding value of the ByteField, if no encoding is described in the XML prolog or byte order mark (BOM). If the encoding is defined in the prolog this value should be ignored. If an invalid encoding (BIN, OCT, HEX) is specified, a [[Extensions.Xml.XmlFormatException|'''XmlFormatException''']] shall be thrown}}
 
|}
 
|}
-->
 
  
 
== 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;
+
ByteField ByteField1;
 
+
Xml.XmlElement XmlElement1;
myComCannel = DiagCom.GetComChannel("DiagnosticsCan_ECU_1", null, false);
+
Xml.XmlDocument XmlDocument1;
 +
 +
/// Flow
  
// Code example using the variable myComChannel
+
XmlElement1 = Xml.CreateXmlElement("root", NULL, {"attr":"val"});
// ...
+
XmlDocument1 = Xml.CreateXmlDocument(XmlElement1, "1.0", @Encoding:UTF-8, false);
DiagCom.CloseComChannel(myComCannel);</syntaxhighlight>
+
ByteField1 = Xml.XmlToByteField(XmlDocument1);
 +
XmlDocument1 = Xml.XmlFromByteField(ByteField1, @Encoding:UTF-8);
 
</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 11:12, 9 October 2018

Classification

Name XmlLoadFromFile
Short Description Returns updating....
Class Term
Extension OTX Xml extension
Group Xml related Terms
Exceptions XmlFormatException
Checker Rules -
Standard Compliant Yes

OTL Syntax

XmlDocumentTerm = Xml.XmlLoadFromFile(ByteFieldTerm, EncodingTerm);

Description

The XmlLoadFromFile term returns an XmlDocument from a ByteField.

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 from a ByteField.

Properties

Name Data Type Class Default Cardinality Description
ByteField ByteField Term - [1..1] The ByteField that encapsulates the XML data.
FallbackEncoding Encoding Term @Encoding:UTF-8 [0..1] Optional encoding value of the ByteField, if no encoding is described in the XML prolog or byte order mark (BOM). If the encoding is defined in the prolog this value should be ignored. If an invalid encoding (BIN, OCT, HEX) is specified, a XmlFormatException shall be thrown

OTL Examples

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

XmlElement1 = Xml.CreateXmlElement("root", NULL, {"attr":"val"});
XmlDocument1 = Xml.CreateXmlDocument(XmlElement1, "1.0", @Encoding:UTF-8, false);
ByteField1 = Xml.XmlToByteField(XmlDocument1);
XmlDocument1 = Xml.XmlFromByteField(ByteField1, @Encoding:UTF-8);

See also

CopyXmlElement
CreateXmlDocument
CreateXmlElement
GetXmlElementAttributes
GetXmlElementChildElements
GetXmlElementName
GetXmlElementsByXPath
GetXmlElementText
GetXmlRootElement
XmlFromByteField
XmlToByteField