OTX Reference  
OpenTestSystem.Otx.Extensions.XML.Terms.CreateXmlDocument Class Reference

Creates a XmlDocument from a XMLElementTerm. More...

Inheritance diagram for OpenTestSystem.Otx.Extensions.XML.Terms.CreateXmlDocument:
Inheritance graph

Public Attributes

EncodingTerm encoding
 Cardinality [0..1]
Optional encoding value of the ByteField (Default = "UTF-8"). If an invalid encoding (BIN, OCT, HEX) is specified, a XmlFormatException shall be thrown. More...
 
XmlElementTerm rootNode
 Cardinality [1]
Root element that is the parent of all other elements. More...
 
BooleanTerm standalone
 Cardinality [0..1]
The optional standalone attribute of a xml declaration (Default = "false"). More...
 
StringTerm version
 Cardinality [0..1]
Optional XML version (Default = "1.0"). More...
 
- Public Attributes inherited from OpenTestSystem.Otx.Core.Terms.Term
MetaData metaData
 Cardinality [0..1]
The MetaData type allows tools to store additional, mainly tool-specific data. More...
 

Detailed Description

Creates a XmlDocument from a XMLElementTerm.

The CreateXmlDocument activity creates a XmlDocument from a XMLElementTerm.

Exceptions
Exceptions.XmlFormatExceptionIf the given encoding is invalid.
Exceptions.XmlChangeExceptionIf the <rootNode> element has already been added to a parent or it is used as a root node of another document.
Syntax
XmlDocumentTerm = Xml.CreateXmlDocument(XmlElementTerm rootNode, StringTerm version = "1.0", EncodingTerm encoding = @Encoding:UTF-8, BooleanTerm standalone = false);
EncodingTerm encoding
Cardinality [0..1] Optional encoding value of the ByteField (Default = "UTF-8"). If an invalid encodi...
Definition: XML.cs:1673
StringTerm version
Cardinality [0..1] Optional XML version (Default = "1.0").
Definition: XML.cs:1663
XmlElementTerm rootNode
Cardinality [1] Root element that is the parent of all other elements.
Definition: XML.cs:1653
BooleanTerm standalone
Cardinality [0..1] The optional standalone attribute of a xml declaration (Default = "false").
Definition: XML.cs:1683
Examples
// Local Declarations
Xml.XmlElement XmlElement1;
Xml.XmlDocument XmlDocument1;
// Flow
XmlElement1 = Xml.CreateXmlElement("root");
XmlDocument1 = Xml.CreateXmlDocument(XmlElement1, "1.0", @Encoding:UTF-8, false);

Member Data Documentation

◆ encoding

EncodingTerm OpenTestSystem.Otx.Extensions.XML.Terms.CreateXmlDocument.encoding

Cardinality [0..1]
Optional encoding value of the ByteField (Default = "UTF-8"). If an invalid encoding (BIN, OCT, HEX) is specified, a XmlFormatException shall be thrown.

◆ rootNode

XmlElementTerm OpenTestSystem.Otx.Extensions.XML.Terms.CreateXmlDocument.rootNode

Cardinality [1]
Root element that is the parent of all other elements.

◆ standalone

BooleanTerm OpenTestSystem.Otx.Extensions.XML.Terms.CreateXmlDocument.standalone

Cardinality [0..1]
The optional standalone attribute of a xml declaration (Default = "false").

◆ version

StringTerm OpenTestSystem.Otx.Extensions.XML.Terms.CreateXmlDocument.version

Cardinality [0..1]
Optional XML version (Default = "1.0").