Importing an XML schema - 7.3

Talend Data Mapper User Guide

Version
7.3
Language
English
Product
Talend Big Data Platform
Talend Data Fabric
Talend Data Management Platform
Talend Data Services Platform
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Design and Development > Designing Jobs
Last publication date
2023-01-05

You can import an XML Schema Definition (XSD) or Web Services Definition Language (WSDL) to Talend Data Mapper.

About this task

An XML Schema describes the structure of an XML document, including its elements and attributes, the number and order of child elements, data types for the specified elements and attributes, and even default or fixed values for the specified elements and attributes.

Note: Talend Data Mapper only supports XSD 1.0.

Procedure

  1. In the Data Mapper tab, expand the Hierarchical Mapper node and right-click Structures.
  2. Click New > Structure.
  3. In the wizard that opens, select Import a structure definition and click Next.
  4. Select the type of import, XML Schema (XSD) for example, and click Next.
  5. Select the file to use:
    • Select an existing resource in your workspace.
    • Import a local file.
    • Import a local folder.
    • Enter the URL to the file.
  6. Click Next.
  7. Select how to organize the imported structures:
    • One folder per namespace prefix (default option): Stores the structure in a folder named after the namespace prefixes in the XML schema.
    • As a tree based on namespace tokens: Organizes a structure in a hierarchy of folders using the namespace tokens.
    • One folder per namespace: Creates folders with names that are built with the namespaces rather than prefixes. Invalid characters are replaced with underscores.
  8. Optional: If you want to keep the original depth of the schema, you can clear the Optimize generated structures (reduce size/depth) check box.

    When you import a complex XSD, you get invisible elements that represent complex types extending other complex types, substitution groups or abstract types. The optimization option removes the invisible elements by moving their children to a higher level to reduce the depth of the structure.

  9. Optional: If you want to exclude some complex types, enter them in the corresponding field:
    Talend Data Mapper automatically excludes XHTML and XSD types. Elements with these complex types are assigned the xsd:any type. You can exclude more types if needed.
    Note: This feature is available only if you have installed the R2020-12 Studio monthly update or a later one delivered by Talend. For more information, check with your administrator.
  10. Select a folder and enter a name for your structure, then click Next.
  11. Click Finish.