Skip to Content

XML as a Source and Target

Jitterbit can read and write XML files and transform XML data into data formats it can process. Any Jitterbit supported-format can transform data to XML and XML to data. Before using XML as a source or target, Jitterbit requires an XML schema (xsd) or document type definition (dtd) to describe the XML structure it needs to read or generate.

Use XML as a Source

To transform data from XML, select XML as the source type when creating a transformation. You will then be prompted for the following:

Select the Schema

Select an XML Schema (XSD) or Data Type Definition (DTD) that describes the structure of the XML document you wish to format the target data to.

  • The system displays all previously used XSD and DTD structures on your server. Select the structure you need if you have already uploaded it to your server.
  • If you have not used this schema before, you will need to upload the XSD or DTD to your server before it can be loaded.

Many XML schema files reference other schema files to derive information about data types and schema rules. As Jitterbit loads a schema file to the server, if it finds references (imports) to other files it will prompt you to load those to the server.

Select the Root Node

All XML structures must have only one root node, which can contain other nodes and elements. Jitterbit will depict the XML structure starting from the root node you select.

Use XML as a Target

To transform data to XML, select XML as the target type when creating a transformation. You will then be prompted for the following:

Select the Schema

Select an XML Schema (XSD) or Data Type Definition (DTD) that describes the structure of the XML document to which you wish to format the target data.

  • The system displays all previously used XSD and DTD structures on your server. Select the structure you need if you have already uploaded it to your server.
  • If you have not used this schema before, you will need to upload the XSD or DTD to your server before it can be loaded.

Many XML schema files reference other schema files to derive information about data types and schema rules. As Jitterbit loads a schema file to the server, if it finds references (imports) to other files, it will prompt you to load those to the server.

Select the Root Node

All XML structures must have only one root node, which can contain other nodes and elements. Jitterbit will depict the XML structure starting from the root node you select.

Transform XML structures

Transforming to XML structures is similar to transforming to other data structures. If XML is used as a target, then XML schemas can provide rules and more information about their structure than standard database table interfaces. Jitterbit will highlight those rules to help you in mapping. Examples of these include:

Mandatory fields highlighted in red in the Target tree

Mandatory fields may highlight once you map to certain elements, as they may be conditional. For example, if element A has a value, then element B must have a value; otherwise element B is optional.

Values

XML schemas can also tell you what values are valid for a particular element. For example, element A is Boolean and must have the values True, False, 1, 0, Yes, or No. Element B can only have the values Red, White or Blue. The Jitterbit server can enforce XML validation before generating the target document.