Spark not able to parse XML - with root tag having attributes

Five Stars

Spark not able to parse XML - with root tag having attributes

I have created a Talend Bigdata Batch Job and added a component "tFileInputXML".


The xml is of the following format: <root version="1.0"><child name="xyz"></child></root>


The tFileInputXML component has following attributes :

Element To Extract = "root" 

Loop xPath Query="/root/child"

Mapping Column=name

XPath Query="@name"

 

With the above configuration,the XML is not getting parsed. But if i remove the attribute(version) from the "root" tag then it is getting parsed.

Please suggest if i am missing any configuration.
Talend version : 6.3.1

Community Manager

Re: Spark not able to parse XML - with root tag having attributes

Hi
The configuration seems OK, not sure if it is a limitation, I will check with our developers and come back to you asap.

Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Five Stars

Re: Spark not able to parse XML - with root tag having attributes

Hi Shong

Any update on the above issue?

Thanks
Six Stars

Re: Spark not able to parse XML - with root tag having attributes

can you please mention the Xsd file for this particular xml file ?

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

2019 GARNER 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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Put Massive Amounts of Data to Work

Learn how to make your data more available, reduce costs and cut your build time

Watch Now

How OTTO Utilizes Big Data to Deliver Personalized Experiences

Read about OTTO's experiences with Big Data and Personalized Experiences

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog