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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tFileInputXML search for ID

Hello,

 

I've try to use the tFileInputXML to extract a node from an xml. The xml structure I have is like the following extraction:

<catalog>

     <article>

          <id>10001</id>

          <name>AAAAXXXXAAA</name>

          <desc>LLLLLL</desc>

          ....

     </article>

     ...

</catalog>

In the tFileInputXML I have the setup the parameters like below to find a particular product by id:

 

0683p000009LtHX.png

 

The problem is that my output is always 0 rows. Could you please give me some lights to check why is not working correctly?

 

0683p000009Lt6z.png

 

.-------------.

|#1. tLogRow_1|

+-----+-------+

| key | value |

+-----+-------+

| id  | null  |

+-----+-------+

 

Thanks in advance.

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

If someone expect the same problem where you could find the solution.

 

solution

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Hello,

Are you able to set up XML metadata for your input file to retrieve the schema in Repository?

For more information, please refer to this online document about:TalendHelpCenter:Centralizing XML file metadata.

Best regards

Sabrina

Anonymous
Not applicable
Author

Hello xdshi,

 

I've solved the issue with a txml map and a condition to filter by id however it takes too much time when the xml is huge (1gb). As far as I read the path solution is the fastest way to filter when xml is huge. Could you please let me know where the issue could be in my design?

 

Thanks in advance.

Anonymous
Not applicable
Author

Hello,

From your screenshot, we see that you are using a global variable in xPath query to search for ID. Is it OK with you?

Have you tried to set up XML metadata for an input file?

In this way, the Schema Viewer area displays a preview of the XML structure. You can expand and visualize every level of the file's XML tree structure.

Best regards

Sabrina

Anonymous
Not applicable
Author

If someone expect the same problem where you could find the solution.

 

solution