Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
marcel_olmo
Partner
Partner

How to get content from Div Html Element

Hi guys,

I have an input field like this :

'<div class="details-two"><div class="details-two addon"> <ul> <li> DesiredValue1 </li>  </ul> </div>   <div class="details-two addon"> <ul> <li> DesiredValue2 </li> </ul> </div> </div>'

And I'd like to get this desired result :

Field
DesiredValue1
DesiredValue2
DesiredValue3

I'm trying to use the function textbetween (using the div element as separator), or subfield( using the li element as separator, because it's the closest one to the desiredvalue string), but I have the following results :

DivImg.png

How would you do that? I've attached my sample to get the point.

PD : I made my example as simple as I can, but in my real example there's a bunch of desired values to pick up, all of them contained in <li> tags.

Regards, Marcel.

1 Solution

Accepted Solutions
cwolf
Creator III
Creator III

you can load it like xml:

LOAD

li%Table as Value

From_Field('DivExample','DivExampleField') (XmlSimple, Table is [div/div/ul/li]);

- Christian

View solution in original post

2 Replies
cwolf
Creator III
Creator III

you can load it like xml:

LOAD

li%Table as Value

From_Field('DivExample','DivExampleField') (XmlSimple, Table is [div/div/ul/li]);

- Christian

marcel_olmo
Partner
Partner
Author

Thanks Christian! I didn't even know that function existed. It's just what I wanted.

Regards, Marcel.