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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
fyk_cz
Contributor
Contributor

[resolved] How to read recursive XML tags

Hi all,
i have a some XML like this:
<tasks>
<task id="1" name="Task1">
<task id="11" name="Task11" />
<task id="12" name="Task12" />
</task>
<task id="2" name="Task2" >
<task id="21" name="Task21"/>
</task>
</tasks>

and I need flat rows ID, Name from each task tag. How to define Loop XPath query for tFileInputXML component?
Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Loop xpath query should be : //task
it will retrieve all task element in the file
for column id xpath query would be : ./@id

View solution in original post

6 Replies
Anonymous
Not applicable

Loop xpath query should be : //task
it will retrieve all task element in the file
for column id xpath query would be : ./@id
fyk_cz
Contributor
Contributor
Author

YES!!! ... That's it. Thx vm.
Anonymous
Not applicable

<?xml version="1.0" encoding="ISO-8859-1"?>
<bookstore>
<book category="COOKING">
<title lang="en">Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
<book category="CHILDREN">
<title lang="en">Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
</bookstore>


This is my xml file and when i am reading this file i am only getting output 2 time but the same value as the first row printed twice
my loopxpath query is /bookstore/book
Anonymous
Not applicable

So can anyoen help to resolve this bug
Anonymous
Not applicable

I have been breaking my head with the same problem 0683p000009MPcz.png
Anonymous
Not applicable

Hi,
Make sure there is not a UTF-8 signature (BOM) on the XML file which can cause weird behavior in Talend.
See http://www.w3.org/International/questions/qa-utf8-bom for additional information.
Best,
-Randall