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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Parse http xml reponse without creating temp file

Hello,
I'm starting with TOS.
I want to get the response of a http request (is a xml output) and then parse it.
I don't want to use a temporary file to store the xml file, I rather like to parse it directly.
My first approach is:
tFileFectch --> tCreateTemporaryFile --> tFileInputXML
Is there any way to achieve this functionality without creating a temporary file?
Any suggestions?
Thanks in advance.
Regards,
Mikel.
Labels (3)
7 Replies
Anonymous
Not applicable
Author

Hello
Yes, you can parse the xml file directly after you get it from URL. The job looks like:
tFileFectch -->OnSubJOBOK--> tFileInputXML-->
Best regards

shong
Anonymous
Not applicable
Author

Hello,
If I use the following structure:
tFileFectch -->OnSubJOBOK--> tFileInputXML
Assume in tFileFetch I get a XML from a URL: hhtp://www.example.com/helloworld.xml
How can I specify in tFileInputXML Filename field the previous entry?
Thanks in advance.
Regards,
Mikel.
Anonymous
Not applicable
Author

Hello Mikel
You are using tFileFetch to featch the xml, you will specify the folder path and file name on tFileFetch. eg:
Destination directory: "c:/shong"
Destiination file name: "helloworld.xml"
On tFileInputxml, specify the file path from local machine. eg:
"c:/shong/helloworld.xml"

Best regards
shong
Anonymous
Not applicable
Author

Hello,
Ok, I understand.
But I don't want to store a file into filesystem.
My objetive is to read the http response (xml) and parse it without saving the file.
It is this possible? or at least I need to store a temp file?
Regards,
Mikel.
Anonymous
Not applicable
Author

Hello
It is this possible? or at least I need to store a temp file?

Delete the file at the end of job. eg:
get file from url and parse xml file
|
onSubjobOk
|
tFileDelete
Best regards
shong
Anonymous
Not applicable
Author

Is it posible to do this:
t_fetch_http_request_as_xml => t_parse_xml => tFileOutputDelimeited
Can you tell me what to use for t_fetch_http_request_as_xml and t_parse_xml with some details to get below results.
I don't want any temp files on file system if possible.
Input XML over http
<xml>
<row type="type1" name="1">
<row type="type1" name="2">
<row type="type1" name="3">
<row type="type2" name="4">
<row type="type2" name="5">
<row type="type2" name="6">
</xml>
result csv file
type1,1
type1,2
type1,3
type2,4
type2,5
type2,6
Anonymous
Not applicable
Author

Hi Aca,
Yes, this is possible.
See my attached screen shot 1.
Make sure you check the "Use cache to save the resource" check box in the properties of the tFileFetch component (screen 2) and use this cache stream as input on the tFileInputXML (screen 3)
Good luck!
Regards,
Arno