Import from XML File

The Import from XML File allows users to import data directly from XML files, specifying the data sheets. The Import from XML File task is divided into two tabs: the Options tab (please refer to the page Import Overview for further and more detailed information) and the Xml Configuration tab, whose characteristics and configuration will be explained in the next section.


The XML Configuration tab

The XML Configuration tab is divided into three panes:

Parsing options

Within this pane, users can set and configure the following options:

  • Number separators: it is divided into Thousands separator and a Decimals separator drop-down list.

  • Missing string: enter the word you want to remove from the dataset.

  • Key for types: specify the string that will be used to identify the type.

Import options

Within this pane, users can find and set the following options:

  • Remove the most external tag when importing dataset: Select this option to reduce the number of identification tags that have no specific values. If selected, Rulex Factory will create empty columns in the imported file.

  • Remove empty rows: select the checkbox if you want to remove the empty rows from the imported dataset.

  • Add group columns: If selected, a tag will be included in an additional column, which identifies which group each row belongs to, for example 1,1,1,2,2,3,3 if there are 3 possible groups.

  • Remove empty columns: select the checkbox if you want to remove the empty columns from the imported dataset.

  • Add an attribute containing filename: select this option to add an extra column with the name of the file to the dataset.

  • Strip spaces: select this option if you want to remove spaces surrounding strings. For example, the string “ class “ will be imported as “class”.

  • Case sensitive:users can select this checkbox if they want uppercase letters values to be considered different from the lower cases ones.

  • Compress white spaces: select it to remove extra consecutive spaces from within strings. For example the string “university program” would be imported as “university program”.

  • Turn off smart type recognition: if selected, prevents automatic recognition of data types, leaving the generic nominal type. This option is useful when manual identification is preferable, for example when there is the risk of a code being misinterpreted as a date.

Table Preview

Within this pane, users will be able to visualize a preview of their imported tables.

On the right of the Table Preview pane, users can find the Number of records in preview spin box.


Example

  • Drag an Import from XML task onto the stage and select the file you want to import.

  • Configure the selected task as explained above in the sections above and link it to a Data Manager.

  • According to the selected text file, your Import from XML task should look like the example provided below.

https://cdn.rulex.ai/docs/Factory/import_xml_ex.webp