This command lets you import any structured text file into XML Spy and convert it to XML format immediately. This is useful when you want to import legacy data from older systems, as most software products support a text export interface of some kind.
Unicode conversion
In order to convert the data into Unicode (the basis of all XML documents), you need to specify which character-set the file is currently encoded in.
For US or Western European Windows systems this will most likely be Codepage 1252, also referred to as the ANSI encoding. If you are importing 16-bit or 32-bit Unicode (UCS-2, UTF-16, or UCS-4) files, you can also switch between little-endian and big-endian byte order.
Field Delimiter
To successfully import a text file, you need to specify the field delimiter that is used to separate columns or fields within the file. XML Spy will auto-detect common row separators (CR, LF, or CR+LF).
Text enclosed in
Text files exported from legacy systems sometimes enclose textual values in quotes to better distinguish them from numeric values. If this is the case, XML Spy lets you specify what kind of quotes are being used in your file, and removes them automatically when the data is imported.
First row contains field names
It is also very common for text files to contain the field names in the first row within the file. XML Spy allows you to define your XML element or attribute names according to this information.
Choose file
Click on the "Choose file" button to select the specific file to be imported, after having defined the import parameters. The file name will be retained the next time you use this dialog box, allowing you to change settings and re-import the same file if the resulting XML file does not match your expectations.
Having selected the file to be imported, XML Spy provides a preview of the data import. Any changes in the above options will be reflected in the preview immediately.
Renaming field or column names
Rename a field or column name by clicking on its title and editing the name.
Attribute, Element, or no columns
XML Spy lets you choose if you want to import a column as an attribute, element, or if you'd rather skip the column entirely.
Click on the icons to the left of the column titles to, toggle between these three options. In the example above,
ContactID and CallDate - are imported as attributes
CallTime - is not imported
Subject - is imported as an element.
Previous
Top
Next