Viewing the XML Schema

View the structure of an XML data source so you can target the right paths when customising XML generation.

Overview

Before you write YAML customizations for XML generation (see Generating XML Files), you need to know the element and attribute paths in your source file. The schema view shows the detected structure of an XML data source, so you can copy the paths straight into your configuration instead of guessing them from the raw file.

Prerequisites

  1. An XML data source already added to your project.

  2. A workflow connected to that XML data source.

Steps

  1. Open the project containing the XML data source.

    Open the project containing the XML data source.
  2. Open a workflow connected to the XML data source.

    Open a workflow connected to the XML data source.
  3. Click the source file to open it.

    Click the source file to open it.
  4. Open the Generate Preview tab.

    Open the *Generate Preview* tab.
  5. Click Generate Preview.

  6. Open the schema view for the source.

    Open the schema view for the source.
  7. Expand the elements to see nested paths and attributes.

  8. Note the path of the element or attribute you want to target.

  9. Use that path in your YAML customization under generation.

    Use that path in your YAML customization under `generation`.

Example

Given a schema view showing a nested customer/address/city element, target it in your configuration like this:

generation:
  xml:
    - path: "customer/address/city"
      type: string

For attribute and text-content targeting syntax, see Generating XML Files.

Confirm Success

The schema view lists every element and attribute path present in the source file. If a path you expect is missing, check that the source file was parsed without errors.

Next Steps

Screens

source file tab
Figure 1. source file tab
generate preview tab
Figure 2. generate preview tab