One Star

tFileInputXML component "Loop XPATH query" issue

Hi there,
I had a problem to define the "Loop XPATH query" in the xFileInputXML component. Now I only can select "Ignore the namespaces" in the Advanced settings and then use below query, "/Customers/Customer".
How can we define this query including its namespace?
I tried to use below format but it did not work.
"//{http://xml.abc.com/schema/indexFull5}Customers/{http://xml.abc.com/schema/indexFull5}Custome"
I used version 4.1.2r53616 Talend Data Quality.
Thanks a lot,
Bob
1 REPLY
One Star

Re: tFileInputXML component "Loop XPATH query" issue

I got one solution but I did not think it was a good one. Maybe this is one issue that Talend need to improve.
you can use below query,
/x:Customers/x:Customer" in this componet if your XML file like below,
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<x:Customers xSmiley TongueageVersion="5.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://xml.abc.com/schema/indexFull5">
<x:Customer xSmiley Very Happyate="2012-12-21T00:00:00"
.....


Here the problem is that you do not use the real namespcae, you use prefix instead. if the XML file changed prefix then you got problem.
Anyone has better solution?
Thanks,
Bob