Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
william_denholm
Contributor III
Contributor III

XML in a CLOB

We have XML stored in a CLOB on our database. We can query the DB and store the CLOB in a QVD with no issues.

When we go to load the CLOB, I want to be able to parse/split the XML in to fields. Some searching on here has brought to textbetween. This works fine for one record in the XML but we have multiple records within ours. Example :

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<records>

     <record>

          <id>1</id>

          <name>Name1</name>

          <type/>

          <cost>10</cost>

     </record>

     <record>

          <id>2</id>

          <name>Name2</name>

          <type>CD</type>

          <cost>20</cost>

     </record>

</records>

I want to be able to parse these to I can have similar to table below

IDNameTypeCost
1Name110
2Name2CD20

Please advise if this is possible?

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Perhaps the from_field load is an option. See some of the search results from this search: https://community.qlik.com/search.jspa?q=xml+from_field


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Perhaps the from_field load is an option. See some of the search results from this search: https://community.qlik.com/search.jspa?q=xml+from_field


talk is cheap, supply exceeds demand
william_denholm
Contributor III
Contributor III
Author

Thank you. This works for one row in the DB, we have multiple DB rows each with multiple records in the XML/CLOB.

Any suggestions?