Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
vinod2086
Creator II
Creator II

How to remove HTML tags in Qlikview

Hi friends am facing one issue not understanding how to resolve

the thing is we are extracting data from share point every thing is fine but some fields contains HTML tags please fing attached file for clear information please help me out.

need very urgent

Thanks in Advance

Regards,

Vinod

1 Solution

Accepted Solutions
vinod2086
Creator II
Creator II
Author

Hi Angad Singh,

Thanks for your reply but the thing is in my Extractor i applied below logic

subfield(subfield((ows_Desc),'<div>',2),'</div>',1) as [Description]

subfield(subfield((ows_Impact),'<p>',2),'</p>',1) as Impact,

    subfield(subfield((ows_Cause),'<div>',2),'</div>',1) as [Cause],

subfield(subfield((ows_Action),'<div>',2),'</div,>',1) as [Action],

subfield(subfield((ows_mplication),'<div>',2),'</div>',1) as [ Implication],

     subfield(subfield((ows_Evidence),'<div>',2),'</div>',1)as Evidence]

after that values are coming like my attachment file is there any other way to remove all HTML tags at a time?

View solution in original post

4 Replies
Not applicable

Check:

Removing HTML markup code

Thanks,

Singh

vinod2086
Creator II
Creator II
Author

Hi Angad Singh,

Thanks for your reply but the thing is in my Extractor i applied below logic

subfield(subfield((ows_Desc),'<div>',2),'</div>',1) as [Description]

subfield(subfield((ows_Impact),'<p>',2),'</p>',1) as Impact,

    subfield(subfield((ows_Cause),'<div>',2),'</div>',1) as [Cause],

subfield(subfield((ows_Action),'<div>',2),'</div,>',1) as [Action],

subfield(subfield((ows_mplication),'<div>',2),'</div>',1) as [ Implication],

     subfield(subfield((ows_Evidence),'<div>',2),'</div>',1)as Evidence]

after that values are coming like my attachment file is there any other way to remove all HTML tags at a time?

CELAMBARASAN
Partner - Champion
Partner - Champion

You can do it with the help of VB script regular expression

Add the below function in Macro

Function RegExReplace(iString, sPattern, rPattern)

  ' Replaces any occurence of sPattern within the string iString with rPattern

  ' and returns the modified string, if no match is found the original string

  ' is returned

  ' iString: string, the input string to search and replace in

  ' sPattern: string, the pattern to search for

  ' rPattern: string, the pattern to replace the found pattern with

  set RE = New RegExp

  RE.Pattern = sPattern

  RE.Global = True

  RegExReplace = RE.Replace(iString, rPattern)

End Function

Use Load Statement as something like below

LOAD

     RegExReplace(Description, '\<.*\>', '') AS Description

....

....

From Source;

Not applicable

You can actually create a mapping table and replace the fields with ''. I found the html special character list here:

degraeve.com/reference/specialcharacters.php

use this as Mapping Table and further clean your code.

Hope this was helpful.

Thanks,

Singh