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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to parse xml in qlikview???

HI ALL,

I want to know that how to parse XML in qlikview.

Description of problemL:

Having table which contains two column A and B,A is varchar and B is clob.

B column has clob data in XML format,

I want to seperate the XML

the XMl format is :

<inv1:structureFormats>

            <cus:sfType>ADDRESS</cus:sfType>

            <cus:name>ADDR_FOR_INDIA</cus:name>

            <cus:structureFormatComponents>

              <cus:id>0</cus:id>

              <cus:name>Address Line1</cus:name>

              <cus:componentType>N</cus:componentType>

              <cus:value>IT 3, Ground Floor, Zone 1&amp;2, Incubation, BlueRidge, New Cognizant, Rajiv Gandhi Infotech Park</cus:value>

            </cus:structureFormatComponents>

            <cus:structureFormatComponents>

              <cus:id>0</cus:id>

              <cus:name>Address Line2</cus:name>

              <cus:componentType>N</cus:componentType>

              <cus:value>Phase 1, Hinjewadi</cus:value>

            </cus:structureFormatComponents>

            <cus:structureFormatComponents>

              <cus:id>0</cus:id>

              <cus:name>Address Line3</cus:name>

              <cus:componentType>N</cus:componentType>

              <cus:value/>

            </cus:structureFormatComponents>

            <cus:structureFormatComponents>

              <cus:id>0</cus:id>

              <cus:name>Landmark</cus:name>

              <cus:componentType>N</cus:componentType>

              <cus:value/>

            </cus:structureFormatComponents>

            <cus:structureFormatComponents>

              <cus:id>0</cus:id>

              <cus:name>Country</cus:name>

              <cus:componentType>G</cus:componentType>

              <cus:value>India</cus:value>

            </cus:structureFormatComponents>

            <cus:structureFormatComponents>

              <cus:id>0</cus:id>

              <cus:name>State</cus:name>

              <cus:componentType>G</cus:componentType>

              <cus:value>Maharashtra</cus:value>

            </cus:structureFormatComponents>

            <cus:structureFormatComponents>

              <cus:id>0</cus:id>

              <cus:name>City</cus:name>

              <cus:componentType>G</cus:componentType>

              <cus:value>Mumbai</cus:value>

            </cus:structureFormatComponents>

       

<inv1:structureFormats>

This is an example for the column name A and suppose value is 1 and same XML is for the column name A value is 2.

How could i get the values in XML for particular column A and its value?

2 Replies
hectorgarcia
Partner - Creator III
Partner - Creator III

qlikview read in a native way xml files as a supported datasource

just in the script choose your xml file and that;s it.

make sure the xml is well formes, i noticxed that the sample you put is not.

the <inv1:structureFormats>  is not closing

hector

hectorgarcia
Partner - Creator III
Partner - Creator III

if this si not the case check this

Re: How can I parse XML string?