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

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tFileInputXML xpath expression limitation issue

I am having trouble with the tFileInputXML(FIX) component. I have an XML file that I believe will need to be processed by more than one FIX because it has multiple nested elements. My plan is to process that XML file and store it in a database. As of right now I will have an individual table for each nest level in the XML file. Each of the nested data elements will have an index that will reference it back to its parent, which came from the XML file. Is this the best way to store the data?
The XML file looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="cdcatalog.xsl"?>
<catalog>
<cd>
<title>Empire Burlesque</title>
<artist>
<name>Bob Dylan</name>
<name>Fake Name</name>
</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
<cd>
<title>Hide your heart</title>
<artist>
<name>Bonnie Tyler</name>
</artist>
<country>UK</country>
<company>CBS Records</company>
<price>9.90</price>
<year>1988</year>
</cd>
<cd>
<title>Greatest Hits</title>
<artist>
<name>Dolly Parton</name>
</artist>
<country>USA</country>
<company>RCA</company>
<price>9.90</price>
<year>1982</year>
</cd>
</catalog>
The <cd> and <name> tags repeat. Because I cannot have more than one xpath look in the FIX I figure I have to use two FIX components to pull this data out. Correct me if I am wrong.
So if all this is correct. How do I associate the two FIX input streams with each other so when I place then in the DB I can give them the correct index to find their parent element? How can I retain that parent/child relationship as I process the file in different FIXs?
Labels (3)
11 Replies
Anonymous
Not applicable
Author

For detailed explanation of reading and processing XML file with multiple nested loops visit the blog post
http://vikramtakkar.blogspot.in/2013/02/read-xml-having-multiple-nested-loops.html
_AnonymousUser
Specialist III
Specialist III

The above post did not help me to solve the problems what the others have quoted previously any help would be appreciated regarding processing complex xml files