Import from Text Files

The steps for importing a text file into an XML file are the following:
  1. Go to menu File > Import > Text File... The Select text file dialog will be displayed.
  2. Select the URL of the text file.
  3. Select the encoding of the text file.
  4. Click the OK button.

    The Import Criteria dialog will be displayed:

    Import from text file

    The input data is displayed in a tabular form. The XML Import Preview panel contains an example of what the generated XML will look like. The names of the XML elements and the transformation of the first 5 lines from the text file are displayed. All data items in the input will be converted by default to element content, but this can be over-ridden by clicking on the individual column headers. Clicking once on a column header will cause the data from this column to be used as attribute values on the row elements. Clicking a second time - the column's data will be ignored when generating the XML file. You can cycle through these three options by continuing to click on the column header. If the data column will be converted to element content, the header will contain the <> symbol. If the data column will be converted to attribute content, the header will contain the = symbol. If it will be skipped, the header will contain an x.

  5. Select the field delimiter for the import settings:
    • comma
    • semicolon
    • tab
    • space
  6. Set other optional settings of the conversion.

    The dialog offers the following settings:

    • First row contains field names - If the option is checked, you'll notice that the table has moved up. The default column headers are replaced (where there is information) by the content of the first row. In other words, the first row is interpreted as containing the field names. The changes are also visible in the preview of the XML document. To return to default (where the first row is interpreted as not containing field names), simply uncheck the option.
    • Change labels - If the above option is set, the first row of the input file contains presentation names and these will be used as tokens in the created XML files, otherwise some generic heading names will be used. This button opens a new dialog, allowing you to edit the names of the root and row elements, change the XML name and the conversion criterion.

      The XML names can be edited by double-clicking on the desired item and entering the required label. The conversion criterion can also be modified by selecting from the drop-down list one of the options: ELEMENT, ATTRIBUTE or SKIPPED.

    • Open in editor - If checked, the new XML document created from the imported text file will be opened in the editor.
    • Save in file - If checked, the new XML document will be saved at the specified path.
      Note: If only Open in editor is checked, the newly created document will be opened in the editor, but as an unsaved file.