Edit online

Import from Text Files

Oxygen XML Editor includes the possibility of importing text files (txt or csv file extensions) as XML documents.

To import a text file into an XML file, follow these steps:

  1. Go to File > Import/Convert > Text File to XML.
    A Select text file dialog box is displayed.
  2. Select the URL of the text file (txt or csv file extensions).
  3. Select the encoding of the text file.
  4. Click the Next button.
    The Import Criteria dialog box is displayed.
    Figure 1. Import Criteria Dialog Box

  5. Configure the settings for the conversion.
    1. Select the Field delimiter for the import settings. You can choose between the following: Comma, Semicolon, Tab, Space, or Pipe.
    2. The Import settings section presents the input data in a tabular form. By default, all data items are converted to element content ( symbol), but this can be overridden by clicking the individual column headers. Clicking a column header once causes the data from this column to be converted to attribute values ( symbol). Clicking a second time causes the column data to be ignored ( symbol) when generating the XML file. You can cycle through these three options by continuing to click the column header.
    3. First row contains field names - If this option is selected, the default column headers are replaced (where such information is available) 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 panel.
    4. Customize - This button opens a Presentation Names dialog box that allows you to edit the name, XML name, and conversion criterion for the root and row elements. The XML names can be edited by double-clicking the desired item and entering the label. The conversion criteria can also be modified by selecting one of the following options in the drop-down menu: ELEMENT, ATTRIBUTE, or SKIPPED.
    5. Import Settings - Clicking this button opens the Import preferences page that allows you to configure more import options.
    6. The XML Import Preview panel contains an example of what the generated XML document looks like.
    7. Open in editor - If selected, the new XML document created from the imported text file is opened in the editor.
    8. Save in file - If selected, the new XML document is saved in the specified path.
  6. Click Import to generate the XML document.