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

extract xml for each row

Hello,

 

In my data source I have records with XML content that I want to extract and duplicate rows :

Data Source 

id | content 

100 | <?xml version="1.0" encoding="utf-8"?><RepeaterData><Version /><Items><Item><Years>2018</Years><data>110</data></Item><Item><Years >2019</Years><data>200</data></Item></Items></RepeaterData>

 

I want to get an out put like  :

 

100 | 2018 | 110

100| 2019 | 200

 

which component could I use ? Any help please ?

Labels (3)
1 Solution

Accepted Solutions
vboppudi
Partner - Creator III
Partner - Creator III

Please try below

 

0683p000009LwoY.png0683p000009Lwi7.png

 

Regards,

View solution in original post

5 Replies
Anonymous
Not applicable
Author

tExtractXMLField

vboppudi
Partner - Creator III
Partner - Creator III

Please try below

 

0683p000009LwoY.png0683p000009Lwi7.png

 

Regards,

Anonymous
Not applicable
Author

Thank's for the solution !! Could you please show me the content of your tjavaRow ? 

when i set context.setProperty("ID", out.id); the value of the property is lost in the tExtractXMLfield

Anonymous
Not applicable
Author

tjavarow code will be like this :

 

context.id=input_row.id; -> Assigning the context value directly.
output_row.content = input_row.content;

 

Anonymous
Not applicable
Author

I don't knoy why with context variables I'm getting empty values .

I used GlobalMap and it work's.

thank you