Four 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

1 REPLY
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