← Back to list

Parsing XML Files Using Talend: A Step-by-Step Guide

How to extract data from XML File into Talend?

Yahia zakaria · 2025-03-15 21:14 · 2 claps · 2.8 min read
#xml #talend #talend-open-studio #parsing #xml-parsing
Open on Medium ↗
Wiki topics: CR · CRISPR & Gene Editing

Parsing XML Files Using Talend: A Step-by-Step Guide

How to extract data from XML File into Talend?

File description

I’m working with a file named film_actor.xml, which contains a list of movies. Each movie has basic information like its ID, title, and description and an embedded list of actors. Each actor has their own ID, first name, and last name.

Create a New Talend Job

open Talend Studio.

create a new job give it a name and click Finish.

Define the XML File in Metadata

Before adding components to the job, define the XML file structure in Talend’s metadata section.

In the Metadata panel, right-click the File XML and select Create file XML.

give it a name like XML_parsing and click Next.

choose Input XML and browse to the location.

click Next to view the XML structure.

Set the Loop and Extract Fields

Next, I tell Talend how to read the XML content:

define the looping element as the <actor> node so that Talend processes each actor in each film.

drag the <actor> node into the XPath loop expression field.

select the id, first_name, and last_name fields under <actor>, hold Shift, and drag them to the Fields to extract area.

also go up a level and select the film_id, title, and description fields, then drag them to the same extract area.

click Refresh Preview to check the data then Next, then Finish.

Add tFileInputXML to the Job

drag the defined XML metadata (XML_parsing) from the Metadata panel into my job canvas. Talend automatically adds a tFileInputXML component.

connect it to a tLogRow component so I can preview the output.

set the tLogRow to display in Table mode for better readability.

Run the Job

When I run the job, Talend reads each actor listed under each film and displays the selected movie and actor information in a neat table format.

References

Data Integration & ETL with Talend Open Studio Zero to Hero | Udemy


메타데이터
post_id
5bc60cc73e40
slug
parsing-xml-files-using-talend-a-step-by-step-guide-5bc60cc73e40
url
https://medium.com/@yahiazakaria445/parsing-xml-files-using-talend-a-step-by-step-guide-5bc60cc73e40
canonical_url
https://medium.com/@yahiazakaria445/parsing-xml-files-using-talend-a-step-by-step-guide-5bc60cc73e40
author_url
https://medium.com/@yahiazakaria445
status
ok
fetched_at
2026-07-19 19:48:13