tExtractXMLField Xpath Query value

Highlighted
One Star

tExtractXMLField Xpath Query value

Below is the XML I am receiving from a webservice.
<root>
<success>true</success>
<message></message>
<access_token>1234567</access_token>
<profile/></root>

I want to extract access_token.  I tried few different options but I am not getting the right result. Here is how it looks currently:

Loop Xpath Query : /       
Xpath Query: /root/access_token
XML field: body  

Given the above XML structure, what is the right Xpath Query should I use in order to get the value of access_id?

Thank you for your help.

Arvind.

Highlighted
One Star

Re: tExtractXMLField Xpath Query value

resolved it myself. I used //root as the Loop Xpath Query and access_token as the field mapping which took care of it. 

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog