XML Converter

Abstract

This plug-in enables the import of XML files (.xml) into the built-in test database and/or their conversion into flat CSV files (.csv) within OMrun. By default, both input and output files use UTF-8 encoding. However, the encoding can be individually customized through the application configuration.

Encoding CSV Input/Output Format

It is possible to define an encoding for the csv file:

  • UTF8 [with BOM]

  • UTF8 without BOM (Default)

  • ANSI

  • UTF7 (decommissioned)

  • UTF32

  • ASCII

  • BigEndianUnicode

  • Unicode


Input

Allowed file types / formats

  • *.xml (Standard xml format)

  • *.txt (file with txt extension or any other file with a different extensions, containing a valid xml structure)

  • *.tor, *.cfg, *.tob, *.tsc, *.env, *.rtl (all OMrun specific files)

Prohibited file types / formats

  • *.exe (Executables)

  • *.csv (Converter result files or standard csv files)

The XML plug-in supports 3 different types of conversion:

  • Database Multi Deletion Deletes all data tables in the built-in test database of OMrun.

  • Database Single Conversion Loads an xml file into the built-in test database of OMrun. Deletes tables with the same system prefixes in advance.

  • Flatfile Single Conversion Loads an xml file into the built-in test database of OMrun and converts it into a csv output file.

For each uniquely named XML file that is loaded, a corresponding header file is automatically created. This header file contains a fixed list of attribute names, ensuring consistency even if the XML files have different structures under the same schema.

  • Queries remain stable despite structural changes in the XML.

  • Unwanted attributes can be removed from the header file to exclude them from future loads.

  • Deleting the header file resets the attribute selection; all attributes are reloaded and a new header file is generated.

  • Each XML file load generates a query that reads both the content and the schema of the XML structure.


Parameters

Database Multi Deletion

Field @param1 = <Empty> Field @param2 = <Empty> Field @param3 = <Empty> Field @param4 = <Empty>

Database Single Conversion

Field @param1 (Input file) [mandatory]

  • Description: Source location incl. file name + extension

  • Syntax: <full path>\<file name>.xml (or any other extension except *.exe, *.csv)

  • Examples:

"C:\Input\Data\Test.xml"
"C:\OMrun\Results\Result.tor"

Field @param2 (System prefix) [optional]

  • Description: System prefix name used as prefix for table names

    • <Empty> uses standard prefix "SourceA".

    • <System prefix> uses defined system prefix, max. char lenght 20

  • Example: Nest_Person, OMrun_Person etc.

Field @param3 = <Empty> Field @param4 = <Empty>

Flatfile Single Conversion

Field @param1 (Input file) [mandatory]

  • Description: Source location incl. file name + extension

  • Syntax: <full path>\<file name>.xml (or any other extension except *.exe, *.csv)

  • Examples:

"C:\Input\Data\Test.xml"
"C:\OMrun\Results\Result.tor"

Field @param2 (Output path) [mandatory]

  • Description: Target location of converted files

  • Syntax: <full path> (without ending backslash)

  • Example: @TestCases\OMrun\Mapping_Business_Rules\Convert_Result_Before_Verify

Field @param3 (Output file) [optional]

  • Description: Target file name + extension

  • Syntax: <file name>.<extension> (without backslash at beginning)

  • Example: Result_Ready2Verify_Amber.csv

  • Possible values:

    • <file name>.csv

    • csv (taking input file name and converting into csv)

    • * [or] <empty> (default = File name from @param1 and converted into csv)

Field @param4 (Header definition file) [optional]

  • Description: File (csv) with all headers generated from XML file

  • Syntax: <file name.csv>

  • Example: Filename_HeaderDefinition.csv

  • Possible values:

    • <header definition file name.csv> (= File will be converted with this header definition file)

    • * [or] <empty> (=No value converts each file with its own header file generated)


Output

Output format of the CSV file is UTF8 by default. Different formats for the input and output file can be set in config file (admin rights needed): C:\Program Files\dbi\OMrun\BuiltInTests\OMrunPlugIn_XmlConverter.exe.config

Last updated