tFileInputXML and Namespaces

One Star

tFileInputXML and Namespaces

Hi there

I have to load a XML file which contains several namespaces.
Unfortunately the sender of the file is not always the same, the namespace prefixes look diffrent for each sender.

Is there a way to specify the namespace mapping for the XPath query?

It would be great if someone could give me a clue.
Rgds | arosct
Community Manager

Re: tFileInputXML and Namespaces

Hello
Is there a way to specify the namespace mapping for the XPath query?

Currently, tFileInputXML can't be used to extract namespace value. You can use other component to achieve it, eg:tFileInputFullRow+tFileFilter.
Can you show us your xml file and what are your expected result?

Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: tFileInputXML and Namespaces

Hi

here a similar sample of the problem.
Both this two xml snippets are valid.
I need a method how to XPath the elements.

Sample 1)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns1:A
xmlns:ns1="http://www.gugus.net"
xmlns:ns2="http://www.dada.net"
xmlns="http://www.toto.net">
<ns2:B>
<C/>
</ns2:B>
</ns1:A>

Sample 2)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<A
xmlns:ns1="http://www.dada.net"
xmlns:ns2="http://www.toto.net"
xmlns="http://www.gugus.net">
<ns1:B>
<ns2:C/>
</ns1:B>
</A>

Thanks.

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