This documentation is available to agents as Markdown at https://docs.synthesized.io/tdk/latest/user_guide/020_guides/generating_data/xml_schema_view.md. For the complete documentation index, see llms.txt.

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.

    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.

    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

Inspecting the Raw XSD

The XML view also lets you inspect the raw XSD behind the detected schema structure (see Viewing the XML Schema), without leaving the workflow - useful when a path in the schema view looks wrong and you want to check the source definition directly.

Steps

  1. Open the XML view for the source.

    Open the XML view for the source.
  2. Open the raw XSD.

    Open the raw XSD.
  3. Compare the raw definition against the paths shown in the schema view.

    Compare the raw definition against the paths shown in the schema view.

Resolving Missing XSD Dependencies

An XSD can import or include other schema files. If one of those dependencies is not available, the XML view flags it instead of failing silently.

Steps

  1. Open the XML view for the source.

  2. Check for a notice about a missing XSD dependency.

    Check for a notice about a missing XSD dependency.
  3. Resolve the missing dependency so the schema can be loaded.

  4. Reopen the XML view to confirm the structure loads in full.

    Reopen the XML view to confirm the structure loads in full.