[resolved] Loop XPath Query Issue in tFileInpuutXML

One Star

[resolved] Loop XPath Query Issue in tFileInpuutXML

Hello,

I have an xml file I need to parse. I need to loop on the following data in the xml file:

"/reporting:root/reportingSmiley Tongueositions1/reporting:window/reporting:folio"
"/reporting:root/reportingSmiley Tongueositions2/reporting:window/reporting:folio"
"/reporting:root/reportingSmiley Tongueositions3/reporting:window/reporting:folio"


"/reporting:root/reporting:instruments/reporting:window/reporting:folio"


The first 3 xpath queries contain the same underlying data, so I can use the following Loop Xpath query:

"/reporting:root/*/reporting:window/reporting:folio"

to collect the position related data in one hit.


However, the wildcard will match to: "/reporting:root/reporting:instruments/reporting:window/reporting:folio", which is what I don't want to happen.

Is there any way I can prevent the instrument childern being iterated ?

I have tried a pattern like:

"/reporting:root/reportingSmiley Tongueositions*/reporting:window/reporting:folio", but this does not work.

Any suggestions greatly appricated.

Thanks
One Star

Re: [resolved] Loop XPath Query Issue in tFileInpuutXML

what about
*[starts-with(name(),'position')]
One Star

Re: [resolved] Loop XPath Query Issue in tFileInpuutXML

Thank you VERY much. That precisely solves my problem.

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

Have you checked out Talend’s 2019 Summer release yet?

Find out about Talend's 2019 Summer release

Blog

Talend Summer 2019 – What’s New?

Talend continues to revolutionize how businesses leverage speed and manage scale

Watch Now

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog