Preparing an XML File for Import
XML (Extensible Markup Language) is a powerful format for handling complex or hierarchical data. Because XML files can have virtually any structure, they must go through a Data Transformation step to be processed by the Import Module. While any valid XML can be used as a source, this guide describes a recommended structure for predictable results.
Unlike JSON or CSV files that are converted into a standard format, your uploaded XML file is used directly as the source for the Data Transformation. The system does not add any wrapper elements. Your transformation stylesheet (XSLT) will therefore need to match the root element of the file you provide.
For example, if you upload an XML file that starts with a <students> root element, your transformation's main template should match <students>.
Recommended XML Structure
To make your data transformation logic easier to write and manage, we recommend a clear and consistent structure for your source XML files. A good practice is to have a single root element (e.g., <records>) that contains a series of identical child elements for each person or record (e.g., <record>).
Example: XML with Repeater Data
This example uses the recommended structure. The root element is <records>, which contains two <record> elements. To handle a repeater, we've nested a collection of <contact> elements inside an <EmergencyContacts> element.
- <records>
- <record>
- <StudentID>4876</StudentID>
- <PrimaryContact>Maria Garcia</PrimaryContact>
- <EmergencyContacts>
- <contact>
- <name>Maria Garcia</name>
- <phone>555-0101</phone>
- </contact>
- <contact>
- <name>Luis Garcia</name>
- <phone>555-0102</phone>
- </contact>
- </EmergencyContacts>
- </record>
- <record>
- <StudentID>3451</StudentID>
- <PrimaryContact>John Chen</PrimaryContact>
- <EmergencyContacts>
- <contact>
- <name>John Chen</name>
- <phone>555-0201</phone>
- </contact>
- </EmergencyContacts>
- </record>
- </records>
In your Data Transformation, you would write the logic to loop through each <record> element, and within that, loop through each <contact> element to format the data for import.
Next Steps
Now that you understand how to structure your XML file for transformation, you're ready to learn about the main interface where you will manage all your import configurations.
Next Article: Understanding the Import Dashboard
Related Articles
Preparing a JSON File for Import
JSON (JavaScript Object Notation) is a lightweight, human-readable format ideal for structured data. Unlike CSV files, all JSON files must go through a Data Transformation step before they can be processed by the Import Module. While the structure ...
Import Error Code Reference
When an import fails, the system will log an error code to help you diagnose the problem. This guide explains what each error code means and provides step-by-step instructions on how to resolve the issue. E0001: Cannot Read File Problem The system ...
Quick Start Guide: Your First Import
This guide provides a step-by-step walkthrough to help you complete your first basic import. We'll use a sample CSV file containing basic IEP information and a manual import to demonstrate the core workflow from start to finish. Before You Begin For ...
Introduction to Import Data Transformation
Sometimes, the data in your source file isn't in the exact structure or format that your forms require. Data Transformation is an optional but powerful step in the import process that allows you to clean, restructure, and manipulate your source data ...
Import Module Terminology
The Import Module allows you to bring data into your forms from external files. Understanding the terminology is crucial for configuring imports, preparing data, and troubleshooting effectively. This guide defines the key concepts you'll encounter. ...