Creating a simple XML data format

To create a new data format for simple XML data:

  1. Open Format Designer.
  2. Click Create new data format.
  3. Complete this general information:
    Format Type
    Select Simple XML.
    Name
    Specify a unique name for the new data format.
    Description
    Optionally, specify a description for the new data format.
  4. Click the TML Details tab.
  5. Click Add Subelement. The Add Subelement dialog opens.
    You can create an element without specifying a namespace and attribute.
  6. Create the root element:
    1. Create a namespace. In the Namespaces section, specify the prefix and URL.
    2. Click Add.
      You can add multiple namespaces but you must also reselect the Namespace in the Element section.
    3. Select the namespace in the Element section.
      If you use a namespace, it must be allocated to an element.
    4. Specify a name for the root element.
    5. Select the number of times the root element may occur. Select from:
      • 0...1 (minimum value=0, maximum value=1)
      • 1
      • 0...* (minimum value=0)
      • 1...* (minimum value=1)
  7. Create an attribute:
    1. In the Attributes section, select a namespace.
    2. Specify a name for the new attribute.
    3. Click Add.
    4. Optionally, add multiple attributes.
  8. Click OK to save your changes.
  9. Select an existing subelement and click Edit to update it.
  10. Select an existing subelement and click Delete to delete it.
  11. Click the up and down arrows to change field positions. Or, you can click and drag a field to the desired position.
  12. Optionally, click the Script tab to create or edit a format in text view.
    Define the file schema using JavaScript. You must specify a name and optional description for each data element.
    Note: The data elements must be defined in the same order as that used in Transformation Designer.
  13. Optionally, click Import XSD to import an XSD file from other sources. Browse to the location of your file. The element, namespace and attributes are extracted and inserted into the rows, replacing any rows you have already defined.
    Note: All imported files must be UTF-8 format.
    Note: Only simple XSD is accepted. Other complex data types are ignored. You are alerted if errors are found during the transformation of the external XSD into a simple XML schema.
  14. Click Save Format.