DriveWorks Pro 16: Import Data From An XML File Into Constants And Controls [send feedback...]

Import Data From An XML File Into Constants And Controls

This Specification Flow Task reads data from an XML file and passes it into the Specification for driving into Constants or Controls.

The XML file format is the same as the format used when importing a Specification through DriveWorks Autopilot.

If a Constant is found with the same name (not case sensitive) then the value from that tag will be passed through to the Constant.

If no Constant is found with that name, then it will look for a Form Control with that name to pass the value to.

If no Control is found, then no action will be taken with that tags data.

Properties

Property NameDescription
TitleChanges the Title (not the name) of the task.
File NameFile name of the XML file including extension.
Constant NameThe Constant used to report on the success of the Specification task, for reference only.

Example

When this Task is added the properties are static. To be able to build rules on a static properties see How To: Change A Static Property To A Dynamic Property.

Property NameExample RuleExample ResultMeaning
File Name"C:\MyDocuments\XMLImport\Import.XML"C:\MyDocuments\XMLImport\Import.XMLThis is the Full File path and name including extension of the XML file to import into DriveWorks.
Constant Name"ImportReporting"ImportReportingThis is the name of the Constant that the task will report to.

Example XML file

XML File
<?xml version="1.0"?>
<Specifications xmlns="http://schemas.driveworks.co.uk/interop/specification/1/0">
    <Specification Transition="Finish" Project="ImportingXML">
        <Input Name="FirstName">Bob</Input>
        <Input Name="SecondName">Jones</Input>
        <Input Name="A">123</Input>
        <Input Name="B">ABC</Input>
    </Specification>
</Specifications>
    

Example Result

NameTypeValue
FirstNameControlBob
SecondNameControlJones
AConstant123
BConstantABC

Table of Contents