# Viewing the XML Schema

> Source: https://docs.synthesized.io/tdk/latest/user_guide/020_guides/generating_data/xml_schema_view
> For the complete documentation index, see [llms.txt](https://docs.synthesized.io/llms.txt).

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](https://docs.synthesized.io/tdk/latest/user_guide/020_guides/generating_data/xml_files_generation)), 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.](https://docs.synthesized.io/tdk/latest/user_guide/_images/xml_schema_view/step-1.png)
2. Open a workflow connected to the XML data source.
  
  ![Open a workflow connected to the XML data source.](https://docs.synthesized.io/tdk/latest/user_guide/_images/xml_schema_view/step-2.png)
3. Click the source file to open it.
  
  ![Click the source file to open it.](https://docs.synthesized.io/tdk/latest/user_guide/_images/xml_schema_view/step-3.png)
4. Open the **Generate Preview** tab.
  
  ![Open the \*Generate Preview\* tab.](https://docs.synthesized.io/tdk/latest/user_guide/_images/xml_schema_view/step-4.png)
5. Click **Generate Preview**.
6. Open the schema view for the source.
  
  ![Open the schema view for the source.](https://docs.synthesized.io/tdk/latest/user_guide/_images/xml_schema_view/step-6.png)
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\`.](https://docs.synthesized.io/tdk/latest/user_guide/_images/xml_schema_view/step-9.png)

## Example

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

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

For attribute and text-content targeting syntax, see [Generating XML Files](https://docs.synthesized.io/tdk/latest/user_guide/020_guides/generating_data/xml_files_generation).

## 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](https://docs.synthesized.io/tdk/latest/user_guide/020_guides/generating_data/xml_files_generation) — write YAML customizations using the paths you found.
- [Configuration Reference](https://docs.synthesized.io/tdk/latest/user_guide/040_reference/configuration/configuration_reference) — full list of generation options.

## Screens

![source file tab](https://docs.synthesized.io/tdk/latest/user_guide/_images/xml_schema_view/screen-1.png)

Figure 1. source file tab

![generate preview tab](https://docs.synthesized.io/tdk/latest/user_guide/_images/xml_schema_view/screen-2.png)

Figure 2. generate preview tab
