HTML Tag String to Normal String

Hi all,
            This is sample HTML Tag string. How can I convert this into normal string
'< s t y l e   t y p e = " t e x t / c s s " >
p   { m a r g i n : 0 p x   0 p x   0 p x   2 p x ; }
u l   { m a r g i n - t o p : 2 p x ; m a r g i n - b o t t o m : 2 p x ; }
o l   { m a r g i n - t o p : 2 p x ; m a r g i n - b o t t o m : 2 p x ; }
. N o r m a l   { f o n t - f a m i l y : P o r t a b l e   U s e r   I n t e r f a c e ; f o n t - s i z e : 1 1 p x ; c o l o r : # 0 0 0 0 0 0 ; v e r t i c a l - a l i g n : m i d d l e ; }
. T a b l e D e f a u l t   { b o r d e r - c o l l a p s e : c o l l a p s e ; b o r d e r : 1 p x   s o l i d   # 0 0 0 0 0 0 ; }
. T a b l e D e f a u l t   t h   { p a d d i n g : 2 p x ; v e r t i c a l - a l i g n : t o p ; t e x t - a l i g n : l e f t ; b o r d e r : 1 p x   s o l i d   # 0 0 0 0 0 0 ; }
. T a b l e D e f a u l t   t d   { p a d d i n g : 2 p x ; v e r t i c a l - a l i g n : t o p ; t e x t - a l i g n : l e f t ; b o r d e r : 1 p x   s o l i d   # 0 0 0 0 0 0 ; }
< / S T Y L E >
< p   s t y l e = " m a r g i n : 0 p x ; " > < s p a n   c l a s s = " N o r m a l " > R e j e c t e d < / s p a n > < / p > '
The above string, I highlighted the wanted string
Regards,
Fame

You really got html with that lots of spaces included?
May be something like the below
with atext as (
select '< s t y l e  t y p e = " t e x t / c s s " >
p  { m a r g i n : 0 p x  0 p x  0 p x  2 p x ; }
u l  { m a r g i n - t o p : 2 p x ; m a r g i n - b o t t o m : 2 p x ; }
o l  { m a r g i n - t o p : 2 p x ; m a r g i n - b o t t o m : 2 p x ; }
. N o r m a l  { f o n t - f a m i l y : P o r t a b l e  U s e r  I n t e r f a c e ; f o n t - s i z e : 1 1 p x ; c o l o r : # 0 0 0 0 0 0 ; v e r t i c a l - a l i g n : m i d d l e ; }
. T a b l e D e f a u l t  { b o r d e r - c o l l a p s e : c o l l a p s e ; b o r d e r : 1 p x  s o l i d  # 0 0 0 0 0 0 ; }
. T a b l e D e f a u l t  t h  { p a d d i n g : 2 p x ; v e r t i c a l - a l i g n : t o p ; t e x t - a l i g n : l e f t ; b o r d e r : 1 p x  s o l i d  # 0 0 0 0 0 0 ; }
. T a b l e D e f a u l t  t d  { p a d d i n g : 2 p x ; v e r t i c a l - a l i g n : t o p ; t e x t - a l i g n : l e f t ; b o r d e r : 1 p x  s o l i d  # 0 0 0 0 0 0 ; }
< / S T Y L E >
< p  s t y l e = " m a r g i n : 0 p x ; " > < s p a n  c l a s s = " N o r m a l " > R e j e c t e d < / s p a n > < / p > ' t from dual
select
regexp_substr (t, '>([^<{]+)< /', 1, level, null, 1) t
from atext
connect by
level <= regexp_count(t, '>([^<{]+)< /')
and
trim(regexp_substr (t, '>([^<{]+)< /', 1, level, null, 1)) is not null
T
R e j e c t e d

Similar Messages

  • Hex string and normal string concatenat​e issue

    Hello,
    what i have is a hex string and a normal string which i want to concatenate into one string.  the problem is that in the output concatenated string you need to select either "normal display" or  "hex display" in the properties.  the problem is if you select hex display then the normal string is converted into hex and if you select normal display then the hex value is not correct.  is there a way to display the hex value in normal display mode?
    attached is a vi showing the problem
    Attachments:
    hex to string.vi ‏7 KB

    lfoitek wrote: ...  i am creating a state machine and then translating it into string representation ... i just can't figure out how to do the conversions to display the correct output.
    If by "correct output", you mean you want something like 4bytes (0xBADDF00D) converted to 8bytes ("BADDF00D" in normal display), then there are several ways ...
    Message Edited by Donald on 08-31-2006 04:17 PM
    =====================================================
    Fading out. " ... J. Arthur Rank on gong."
    Attachments:
    HexHeadaches.jpg ‏24 KB

  • Method to Format a string column containing HTML tags as simple string.

    Hello,
    I am working with formating a string column which holds Html tags.
    I want to remove these tags from the actual data which has to be shown on the BI Publisher report.
    Can you suggest how can we format this in the DataSet designer of BI publisher so that my data is recognised on the Layout designer.
    I have been trying to create an expression using the "Add Element by Expression" option to format this html tag data as normal string without the tags.
    Can you suggest if this is the correct method to do this.
    I found this below code being used in an existing DateSet but i am not able to recreate a similar formating on this kind of data column.
    <![CDATA' || '['|| TO_CLOB(SUCCESS_CRITERIA) || ']' || ']>
    Kindly suggest if you have any idea on the above mentioned issue.
    Thanks,
    Shweta

    And read this:
    Navigate yourself around pitfalls related to the Runtime.exec() method
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • Escaping html tags

    Hi all,
    I have af:inputText with:
    <af:autoSuggestBehavior suggestedItems="#{myBean.partSuggestedItems}"/> .
    I am constructing the " List<SelectItem>" normally. No problem.
    I am using code like:
    SelectItem selectItem = new SelectItem();
    selectItem.setValue(eValue);
    selectItem.setLabel(eLabel);
    ...How can I escape HTML tag to be treated as HTML tag instead of pure string?
    How can I achieve this??
    Please advice.

    Escape property can be defined on Output text only, not on input text.
    I want to add style in the auto suggested list. So the values shown in Italic, or some color.
    selectItem.setLabel(); expects a String.
    So I want to fill my string with HTML tags.
    I tried:
    String italic = "<i>" + eLabel + "</i>";
    selectItem.setLabel(italic);But obvious that did not work.
    Can I escape HTML tags in a String value??

  • HTML Tags in Text View

    Is it possible to use HTML tags to format a string displayed
    within a text view.  If so how?

    Jonathan,
    No, this is impossible for TextView.
    In WD ABAP it is possible using FormattedTextView UI control.
    See my post that describes workaround for WD Java: /people/valery.silaev/blog/2005/11/23/display-formatted-text-using-webdynpro-for-java
    VS

  • Html tags using javax.jws.WebService

    Hi,
    I am using javax.jws.WebService and I met a problem for html tags.
    In a String containing "<" and ">", the javax.jws.WebService implmentation of IBM transfered the String with "<" and ">" in the XML reply. How could this translation be avoided?
    Regards.
    Pengyou

    The XML content in the soap request looks like this:
    <myXml>
        <tagWithCdata><![CDATA[<test>123</test>]]></tagWithCdata>
    </myXml> The String "tagWithCdata" in the Java object looks like this: "<test>123</test>"
    And the marshalled XML in the soap response looks like this:
    <myXml>
        <tagWithCdata><test>123<test></tagWithCdata>
    </myXml>But I expect to have the same format as the soap request, i.e.
    <myXml>
        <tagWithCdata><![CDATA[<test>123</test>]]></tagWithCdata>
    </myXml>

  • HTML tag strip (email parsing use case)

    Have you guys come across the requirements of parsing a HTML message, lets say an email, and convert into text?
    The most common use case would be email parsing, remove all the HTML tags and use as string.
    It has to remove the entire tags, with attributes, for example tables, with TRs and TDs with properties, must be removed. The BR converted into carriage return, etc?
    Cheers,
    Renato Fichmann

    Derek,
    In my situation, I'm triggering a process from an email. I need to extract information out of this email but it's not formatted as XHTML. I don't know there's an easy way to preprocess the email first before trying to disect it.
    I'm working on an alternative solution but that relys on the people sending me the email to grant direct access to their systems.
    Hopefully there'll be some funky string functions like this in upcoming releases??
    Ryan

  • HTML Tags within Javascript Errors

    Hi,
    Is there a way to insert html tags (<b>Bold Text Here</b>), inside a javascript string in the <script> tag, without any Validation errors? I read to put a backslash at the beginning of each html tags to prevent the string from being parsed as markup (<\b>Bold Text Here<\/b>). Errors goes away, but bold texts too !
    Anyone can help me on this one ... I'm not a javascript Guru ...
    Thanks !

    All wrong... Correct string notation always requires single or double quotation marks:
    "\b this is a string"
    \b this is garbage
    Additionally, whan you escape characvters, each one must be escvaped separately:
    \b ... \/\b
    Mylenium

  • Print an HTML string as normal text

    Hello,
    I have a simple html file with couple of lines in it.
    I want to use the Java API to print this HTML string as normal text output.
    Here is the program tht I have written:
    This program compiles but doesnt give the required output.
    Any suggestions:
    package test.print;
    import java.io.*;
    public class printHTML
    public printHTML()
    public static void main(String[] args)
    printHTML printHtml = new printHTML();
    File htmlFile = new File("C:\\Jayashree\\Examples\\printHTML\\testPrint.html");
    System.out.println("File name:" + htmlFile);
    printHtml.print(htmlFile);
    public void print(File htmlFile)
    try
    // PrintWriter out = new PrintWriter(new ByteArrayOutputStream());
    PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(htmlFile)));
    System.out.println("Print Writer object:" + out);
    out.println(htmlFile);
    out.flush();
    out.close();
    catch(Exception e)
    System.out.println("Exception:" + e.toString());
    e.printStackTrace();
    Further, if i have an file with strings like
    <html> this is a test html page </html>
    How do i print the string as normal text without the tags?
    Thnx in advance!
    Regards,
    Jayashree

    what is that u want
    the code below worked fine for me
    package com.test.io;
    import java.io.*;
    public class IOTest  {
      public IOTest() {
      public void print(File htmlFile) {
        try {
          PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(htmlFile)));
          out.println("<b>is this the desired result</b> or is this the one <i>what about this</i>");
          out.println("<table border=\"3\"><tr><td>there is some info here</td><tr></table>");
          out.flush();
          out.close();
        catch(Exception e) {
          System.out.println("Exception:" + e.toString());
          e.printStackTrace();
      public static void main(String [] args) {
        IOTest io = new IOTest();
        File htmlFile = new File("C:\\TEMP\\testPrint.html");
        io.print(htmlFile);
    }

  • Integrate html tags in a string and display it in a multiline text area

    Hi ABAPers!!
    First of all let me tell you that I'm working in ACCENTURE Casablanca(Morocco) and this is my first Job in my career.
    I'm working on an ALV OO, the program consists on creating an ALV using OO, In my selection screen there's a parameter of type ddobjname I provide the name of table and it returns the table's fields in another dynpro (screen0100), To do this I used the FM: 'DDIF_FIELDINFO_GET' then I append the internal table returned in another one to add the field CB (CheckBox), and I add a button in the toolbar, the function of this button is to generate a MySQL script To create the table provided by the user in my parameter (Screen 1000), but the fields of this table(MySQL) in the generated script are only the selected ones by cheking the checkbox in the ALV.
    I store my script in a string.
    My problem is that I want to show my script in a text area, but I don't know how to create a multiline text area!!
    And I want to use HTML tags in my string.
    I don't want to my string like this :
    CREATE [TEMPORARY] TABLE [IF NOT EXISTS] SPFLI ( CONNID CHAR ( 4 ) NOT NULL PRIMARY KEY , FLTIME INT ( 10 ) , DEPTIME DATETIME ( 6 ) , DISTANCE DOUBLE ( 9 ) , FLTYPE VARCHAR ( 1 ));
    But I want it to be shown like  this:
    CREATE [TEMPORARY] TABLE [IF NOT EXISTS] SPFLI (
    CONNID CHAR ( 4 ) NOT NULL PRIMARY KEY ,
    FLTIME INT ( 10 ) ,
    DEPTIME DATETIME ( 6 ) ,
    DISTANCE DOUBLE ( 9 ) ,
    FLTYPE VARCHAR ( 1 ));
    Thanks in advance
    Regards
    SMAALI Achraf
    Edited by: SMAALI90 on May 11, 2011 7:12 PM

    Hi again!!
    You know what!! let's forget the HTML and focuse on what I want to show.
    As I told you, I've a string which contains my script.
    I don't want that it will be shown as a simple line like this :
    CREATE [TEMPORARY] TABLE [IF NOT EXISTS] SPFLI ( CONNID CHAR ( 4 ) NOT NULL PRIMARY KEY , FLTIME INT ( 10 ) , DEPTIME DATETIME ( 6 ) , DISTANCE DOUBLE ( 9 ) , FLTYPE VARCHAR ( 1 ));
    But I want it to be shown as follows:
    CREATE [TEMPORARY] TABLE [IF NOT EXISTS] SPFLI (
    CONNID CHAR ( 4 ) NOT NULL PRIMARY KEY ,
    FLTIME INT ( 10 ) ,
    DEPTIME DATETIME ( 6 ) ,
    DISTANCE DOUBLE ( 9 ) ,
    FLTYPE VARCHAR ( 1 ));
    and finally I want to show it in a multiline text area.
    Plz what shud I do?!!! If possible I need a piece of code.
    PS : I create a HTML Viewer using this code :
    DATA : go_conteneur          TYPE REF TO cl_gui_docking_container,
                 go_controle_html    TYPE REF TO cl_gui_html_viewer.                 
      CREATE OBJECT go_conteneur                     
        EXPORTING                                    
          repid     = sy-repid                       
          dynnr     = '0100'                         
          side      = go_conteneur->dock_at_bottom   
          extension = 1000                           
          name      = 'CONTENEUR'                    
        EXCEPTIONS                                   
          OTHERS    = 1.                             
      CREATE OBJECT go_controle_html                 
        EXPORTING                                    
          parent = go_conteneur                      
        EXCEPTIONS                                   
          OTHERS = 1.
    But when it's shown my ALV disappears!!!

  • How to remove HTML tags from a String ?

    Hello,
    How can I remove all HTML Tags from a String ?
    Would you please to give me a simple example ?
    Best regards,
    Eric

    Here's some code I cooked up. I have created an object that processes code so that it can be incorporated directly into a project. There is some redundancy so that the it can be used in more than one way. Depending on your situation you might have to make the condition statement a little more sophisticated to catch stray ">" tags.
    I have also included a Tester application.
    //This removes Html tags from a String either by submitting the String during construction and then
    // calling getProcessedString() or
    // by simply calling " stringwithoutTags=removeHtmlTags(stringWithTagsSubmission); "
    //Note: This code assumes that all"<" tags are accompanied by a ">" tag in the proper order.
    public class HtmlTagRemover
         private String stringSubmission,processedString,stringBeingProcessed;
         private int indexOfTagStart,indexOfTagEnd;
         public HtmlTagRemover()
         public HtmlTagRemover(String s)
              removeHtmlTags(s);          
         public String removeHtmlTags(String s)
              stringSubmission=s;
              stringBeingProcessed=stringSubmission;
              removeNextTag();
              return processedString;
         private void removeNextTag()
              checkForNextTag();
              while((!(indexOfTagStart==-1||indexOfTagEnd==-1))&<indexOfTagEnd)
                   removeTag();
                   checkForNextTag();
              processedString=stringBeingProcessed;
         private void checkForNextTag()
              indexOfTagStart=stringBeingProcessed.indexOf("<");
              indexOfTagEnd=stringBeingProcessed.indexOf(">");
         private void removeTag()
              StringBuffer sb=new StringBuffer("");
              sb.append(stringBeingProcessed);
              sb.delete(indexOfTagStart,indexOfTagEnd+1);
              stringBeingProcessed=sb.toString();
         public String getProcessedString()
              return processedString;
         public String getLastStringSubmission()
              return stringSubmission;
    public class HtmlRemovalTester
         static void main(String[] args)
              String output;
              HtmlTagRemover h=new HtmlTagRemover();
              output="The processed String: "+h.removeHtmlTags("<Html tag>This is a test<another Html tag> string<yet another Html tag>.");
              output=output+"\n"+" The original string:"+h.getLastStringSubmission();
              System.out.print(output);

  • Search for strings inside html tags ?

    Is there any way to get Spotlight to find search strings inside html documents? One example is I want to find any file that includes a certain alt=" " string inside an img src tag.
    Spotlight does not seem to include anything inside html tags in it's search, as far as I can tell.
    Am I missing something? Is there something I need to do?
    Thanks for any ideas,
    KarenD
    G5   Mac OS X (10.4.4)  
    G5   Mac OS X (10.3.5)  

    Very strange--it does find text inside the html files, but indeed does not seem to have text that is in the file but only appears within a tag. The solution is EasyFind by Christian Grunenberg:
    http://www.grunenberg.com
    You can do a content search on files in a particular folder, which I recommend since it does a brute force search and can take awhile if it has to search everything.
    Francine
    Schwieder

  • Stripping HTML Tags from a String

    What's the best way to remove html tags from a string (i.e. user input)?

    Can you give an example? You can do substring, if your passing spaces between pages you can do a trim to the variable. Also look at the indexOf(). Look at methods relating to java.lang.String.

  • HTML tag in Coldfusion string not appearing

    Hey guys I'm wondering what I'm doing wrong when trying to
    store an html tag in a string. Basically I'm dynamically creating a
    list for use in a javascript menu, so when building the menu, I do
    this:
    menu = "< ul id = """ & mainID & """
    ><br>";
    to generate a list (of course thats only part of the list
    code). This line produces < ul id = "mainID" >
    What I need is for the spaces to be removed, so it would
    produce <ul id="mainID">
    But in my Coldfusion function, if I write:
    menu = "<ul id=""" & mainID & """><br>";
    nothing shows up! A space between < and ul works fine, but
    once I delete them, nothing! Any help would be really appreciated,
    thanks.

    actually found the answer elsewhere, I declared a variable
    open = &lt; now instead of using the <, i just write open,
    which generates the list fine.
    but a followup, the list is being generated now, but on the
    page instead of the javascript/css menu catching it and formatting
    it, it just displays the whole list, tags and all. I tried
    htmlEditFormat( ), that only changed all the symbols to their I
    guess ASCI couterparts. Any ideas why its showing the list as text
    rather than creating a menu??
    also I tried it without the menu, which should have shown a
    bulleted list, but that didn't work either...

  • I require anyones help to extract string from an html tag

    I wanted to extract the strings available in the tag named html
    eg.. <html> Hello </html>
    I require to extract the string Hello into a string variable without using if's
    Secondly,
    i require to extract the name of form in the html tag ..
    eg.. <form name= 'basic'> </form>
    Can any one tell how can this be implemented efficiently.. and using wich concept can this be implemented easily..
    Thanking you,
    bye..
    ur's True friend

    Use a ParserCallback. It notifies you everytime it finds a new tag:
    http://forum.java.sun.com/thread.jspa?forumID=31&threadID=623365
    Or use the HTMLEditorKit to parse the HTML. Then use an iterator to get the tag you need. See reply 5:
    http://forum.java.sun.com/thread.jspa?forumID=31&threadID=655038

Maybe you are looking for