Creating an XML Export

Creating an XML Export

Building using a Preset (XML Only)

If you do no have specific format requirements, or would like to see examples of how to develop using XSLT 1.0, you can use our "Presets" feature. To use a Preset, click on the button in the Action Bar.

Warning
Using the Presets feature will overwrite the existing definition. If you overwrite your definition with a preset, please discard changes and reopen the editor to avoid overwriting your work.

When creating a Preset, you are presented with the following options:

Build With Form Hierarchy
When this option is enabled, the tabs will be nested based on the hierarchy of the form.
When this option is disabled, the tabs will be all be placed at the same nested level.

Exclude Nodes With Blank Data
When this option is enabled, the generated preset will include conditional tags that will not include an elements tag if the value is blank. Otherwise, all element nodes will always be included.

When using software to read the export, it may prefer to always have all blank nodes. If a human is going to be reading 

Node Name
This option will determine how each node will be named. The naming options are:
  1. Element Id: This option will name nodes using the Element ID, with an "e" appended to the ID.
  2. Element with Id Attribute: This option will name all nodes "element", but will add an attribute that contains the Element ID.
  3. Description: This option will clean the element description and use that description as the name. This option can produce unwieldy node names and should be used with caution.
Group Records By
This option will add code to the preset that will automatically group records by the persons Location, Grade, or Role.


Editing the Definition

Developing the export definition uses XSLT 1.0 as a processor to generate the text out.

As you are developing, we encourage you to frequently preview the result to understand how your code is working. The source of the preview data is displayed in the "Data Source" panel, as described in Step 6. This data source is populated with the most recent updated 25 records that you also have access to.

We have included a custom function that you can use to help with data formatting. Certain formats such as CSV and JSON require some characters to be handled differently. This can include quotes and commas. The function is called str:sanitize(), and an example of using it is:

<xsl:value-of select="str:sanitize('e123456789')"/>



Idea

Additional Resources





    • Related Articles

    • Creating a CSV Export

      Developing the export definition uses XSLT 1.0 as a processor to generate the text out. As you are developing, we encourage you to frequently preview the result to understand how your code is working. The source of the preview data is displayed in ...
    • Creating a JSON Export

      Developing the export definition uses XSLT 1.0 as a processor to generate the text out. As you are developing, we encourage you to frequently preview the result to understand how your code is working. The source of the preview data is displayed in ...
    • Export Module - Generating Presets Definitions

      Currently, the ability to generate presets is available only for XML Format exports, with plans to expand support for CSV and JSON formats in the future. Presets are designed to streamline the export process by allowing users to configure settings ...
    • Data Export Module - Resources List

      To help you get started and make the most of the Export Module, we offer a comprehensive set of resources. These articles cover everything from basic setup to advanced usage, ensuring that users of all experience levels can benefit from the module's ...
    • Data Export Module - Terminology

      The Export Module in Clevr empowers users to extract form data into flexible formats like CSV, JSON, or XML. To maximize its functionality and ensure seamless implementation, it’s important to understand the specific terminology used throughout the ...