Viewing the XML Schema
View the structure of an XML data source so you can target the right paths when customising XML generation.
| XML generation is off by default; see how to turn it on. |
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
-
An XML data source already added to your project.
-
A workflow connected to that XML data source.
Steps
-
Open the project containing the XML data source.
-
Open a workflow connected to the XML data source, then its XML view tab. It has three tabs: Structure, Source file and Preview output.
-
Open Source file to see the source XSD.
-
Optional: open Preview output and click Generate preview to see the XML your current configuration produces. After a preview, the button reads Regenerate, with Download next to it.
-
Open Structure to see the schema.
-
Expand the elements to see nested paths and attributes.
-
Note the path of the element or attribute you want to target.
-
Use that path as a key in your YAML customisation file.
Example
Given a schema view showing a nested customer/address/city element, target its text content in your YAML customisation file like this:
"customer/address/city/text()":
transformation:
type: formatted_string_generator
pattern: "[A-Z][a-z]{4,9}"
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
-
Generating XML Files — write YAML customizations using the paths you found.
-
Configuration Reference — full list of generation options.
Inspecting the Raw XSD
The XML view also lets you inspect the raw XSD behind the detected schema structure (see the schema view steps above), without leaving the workflow - useful when a path in the schema view looks wrong and you want to check the source definition directly.