Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

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
Labels (4)
2 Replies
_AnonymousUser
Specialist III
Specialist III
Author

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 x 0683p000009MAB6.pngageVersion="5.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://xml.abc.com/schema/indexFull5">
<x:Customer x 0683p000009MACJ.pngate="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
DataEngineer1978
Contributor
Contributor

So it's still not clear to me how you would define this xml structure. So let's have an example that can be represented better - here is the xml file structure:

 

<Customers>

<Customer_Id>123456</Customer_Id>

<Customer_name>John Smith</Customer_name>

</Customers>

 

So in the Loop Xpath query you would represent it as:

 

/Customers/Customer_Id/Customer_name ? Is this correct?