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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tRest with XML response export to CSV

Hello all, 

this my first work with XML based data and I need some help, I hope you can help me in my case. I have an API where I get a XML post, this post I need to export into a CSV file. Is an easy way existing how to get the API response to CSV?

 

The RestAPI call is very simple. A link with parameters. I get an XML response back with the following entry:

  1. body
  2. ERROR_CODE

Sample response from API:

<API_RESPONSE><QUANTITIES>

<PRODUCT><PRODUCTS_MODEL>12M100L10-BG-0</PRODUCTS_MODEL><QUANTITY>330</QUANTITY></PRODUCT><PRODUCT><PRODUCTS_MODEL>12M100L10-CC-0</PRODUCTS_MODEL><QUANTITY>375</QUANTITY></PRODUCT>

 

How can I put the response into a table structure?

 

Many thanks in advancded

 

 

 

Labels (5)
1 Reply
vapukov
Master II
Master II

you need to use tExtractXMLField  

best for study XML using one of XML related tools (easiest way) and test XPath expressions there, like OxygenXML or Altova

some good explanation - 

https://www.w3schools.com/xml/xml_xpath.asp

https://msdn.microsoft.com/en-us/library/ms256086%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396

https://goessner.net/articles/JsonPath/