Replacing html tags in a htmldocument

Hi Java Gurus
I have a htmldocument which has the bacjground set to black and foreground to white.
When i print the document i see the text in white color ( rather invisible).
I thought the foreground color of the document needs to be changed.
How can i do this ?
Thanks in advance
Naveen

rest_in_peace wrote:
You'll get a faster, more effective response to your questions by including as much relevant information as possible upfront. This should include:
<li>Full APEX version
<li>Full DB version and edition
<li>Web server architecture (EPG, OHS or APEX listener)
<li>Browser(s) and version(s) used
<li>Theme
<li>Template(s)
<li>Region/item type(s)
Read the FAQ and forum sticky threads for more information on using the forum effectively.
With APEX we're fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues.
I have created a form on a table. Now one of the fields in the form is a display only field and its datatype is varchar2.There are a number of different ways of "creating a form on a table" and of making "display only fields". Describe exactly what you mean using actual APEX terminology of regions, items, and their attributes.
The data in the database column of the field contains html tags which is getting displayed as it is without being parsed. It is not possible for me to edit the data in the table itself since there are thousands of data. So I need a way to display the data with the html tags parsed and not displayed as it is. Please any help would be grealy appreciated. How this is achieved is version-dependent: provide the full APEX version.

Similar Messages

  • Replacing HTML tags using HTMLEditorKit etc.

    Hi
    Not sure if this is the best place to ask this. I've searched without finding much.
    Basically I am trying to create a HTML template system for output. User's can change the templates to change the program output.
    The templates are basic HTML with custom tags inserted, that reside in a templates directory. For example, a simple template might be:
    <html><body>
    <table width="100%"><tr><td width="25%">Here is the output:</td>
    <td> <insertOutputHere> </td>
    </tr></table>
    </body></html>
    ^^ Users would be able to edit these template .htm files to affect the output .htm files. For instance, changing where the <insertOutputHere> tag is, or formatting the table it is output to.
    I am using the Swing HTMLDocument, HTMLWriter, HTMLEditorKit classes to load and parse the .htm files, iterate the tags and replace any custom tags (defined in code) with the program output. I have been able to locate these custom tags no problem, but I don't know how to replace this tag entirely with my output (Which will be formatted HTML string). I have been trying to use the insertBefore, insertAfter methods with limited success. In particular I have an 'include' custom tag which includes other files by recursion - it works except the <include> tag is not removed, and depending on which insert method I use, it usually goes into an infinite loop of parsing the <include> tag WITHOUT removing it, then picking it up again when its done.
    Basically I'm looking for any advice as to how to go about COMPLETELY REPLACING these tags with a well structured HTML string. I can post some code if need be but I barely comprehend what I've done, LOL.
    TIA

    I've looked over my mess of comments :)
    setOuterHTML is what I was previously using and it was quite unpredictable at times, as far as I could tell it is very strict with it's requirements for structured HTML (EG no floating line breaks, everything must be "paragraph-ised" which b0rks up the layout) and I can't rely on anyone using/extending these classes to write well structured HTML.
    I remember the problems being quite odd, such as the output for one custom tag being displayed twice for some and not at all for others, and while it isn't critical data, it was still displayed in a way that it could be interpreted as correct - I just knew it wasn't.
    So I dropped setOuterHTML to try insertAfterEnd - this leaves the tags in there and, like roughly explained above, it would pick up tags infinitely because they were not being replaced.
    Here is a relevant method to give a better idea of what I've done:
           public HTMLDocument parseHTMLfile(String filename, Custom_HTML_Tag tags[]) {
          //create a document
             HTMLDocument doc = (HTMLDocument)kit.createDefaultDocument();
             fileDepth++;
             try {
             //read in the file
                BufferedReader rd = new BufferedReader(new FileReader(filename));
                kit.read(rd, doc, 0);
                if (tags != null) {
                //replace tags with page content
                   ElementIterator it = new ElementIterator(doc);
                   Element e;
                   while ((e = it.next()) != null) {
                   //look for includes
                      if (e.getName().equals("include")) {
                         if (fileDepth >= 5){
                         //WARNING:
                            System.out.println("fileDepth has reached 5, include may be recursive. aborting.");
                            continue;
                         String href = (String)e.getAttributes().getAttribute(HTML.Attribute.HREF);
                      //grab parent of current file (IE the folder in which it sits)
                         File f = new File(filename);
                         String include = f.getParent() + sep + href;
                         f = new File(include);
                         if (f.exists()) {
                            HTMLDocument htmld = parseHTMLfile(include, tags);
                            StringWriter sw = new StringWriter();
                            HTMLWriter w = new HTMLWriter(sw, htmld);
                            w.write();
                            doc.setOuterHTML(e, sw.toString());
                         else {
                         //couldnt find include file - warning
                      for (int i=0; i < tags.length; i++) {
                         if (e.getName().equals(tags.getName())) {
    //doc.setOuterHTML(e, tags[i].getText());
    doc.insertAfterEnd(e, tags[i].getText());
    //System.out.println("found tag: " + tags[i].getName() + ": " + tags[i].getText());
    catch (BadLocationException ble) {// cant happen?
    System.err.println("ERROR (" + 999 + "): Could not parse document " + filename + "; BadLocationException");
    System.err.println(ble);
    catch (FileNotFoundException fnf) {
    System.err.println("ERROR (" + 999 + "): Could not parse document " + filename + "; File not found");
    //System.err.println(fnf);
    catch (IOException ioe) {
    System.err.println("ERROR (" + 999 + "): Could not parse document " + filename + "; I/O Error:");
    System.err.println(ioe);
    fileDepth--;
    return doc;
    setInnerHTML kills it with the 'Can not set inner HTML of a leaf' error
    Thanks

  • Inserting custom HTML tags into a HTMLDocument to be displayed in a JEditor

    Does anyone know how to insert custom tags into a HTMLDocument to be displayed in a JEditorPane?
    I have tried using the following code,
    kit.insertHTML( doc,
                    jep.getCaretPosition(),
                    "<testtag>FFFF</testtag>",
                    0,
                    0,
                    new HTML.UnknownTag("testtag") );When the above code is run the handleStartTag, handleEndTag and handleText methods are called on the HTMLReader but nothing is inserted into the document model? Can anyone help?
    I have created an instance of HTML.UnknownTag,
      public static HTML.Tag testTag = new HTML.UnknownTag("testtag");I have subclassed HTMLEditorKit and overridden the getParser() method,
      protected Parser getParser(){
        DTD dtd = null;
        try {
          dtd = createDTD( DTD.getDTD("html32"), "html32" );
        } catch ( Exception e ) {
          e.printStackTrace();
        dtd.getElement( "testtag" );
        Parser p = new ParserAdaptor( new DocumentParser( dtd ) );
        return p;
      }I have subclassed HTMLDocument and HTMLDocument.HTMLReader and created a TagAction for my new tag.
    The following code works fine, the custom tag is in the document model,
        String contents =    "<html>"
                           + "<body>"
                           + "<testtag>Here is some text</testtag>"
                           + "</body>"
                           + "</html>";
        ((HTMLDocument)jep.getDocument()).setPreservesUnknownTags(true);
        jep.setText( contents );

    I've been trying to get <blockquote> insert working in an editor but it seems to be a quite difficult task even if it's only about inserting a couple of tags into the right slot! This is the closest I got:
    HTMLDocument doc = (HTMLDocument)editor.getDocument();
    int start = editor.getCaretPosition()
    int paraStart = doc.getParagraphElement(start).getStartOffset();
    int paraEnd = doc.getParagraphElement(start).getEndOffset();
    String insideBlockQuotes = doc.getText(paraStart, paraEnd - paraStart);
    doc.setOuterHTML(doc.getParagraphElement(start),"<blockquote><p>"+insideBlockQuotes+"</p></blockquote>");
    This is how it works: Get the current paragraphs start and end positions, read the text between the start and end into a string, replace the paragrapElement with <blockquote><p>..the text from string..</p></blockquote>.
    This works 'in about' but it's far from perfect.. it has the following problems:
    1. It looses all formatting from the quoted paragraph (bold etc. tags from the quoted part)
    2. It assumes that the paragraphElement was a <p> (could have been another element too!)
    3. It's ugly
    Anybody come up with a better way to use blockquote?

  • Replace HTML tags within column values

    Hi Gurus,
    I have a requirement where I have some text which has HTML tags inserted within it and I need to insert either Presentation variable or a GO URL replacing that tag. Problem is that this text is value of a column from table. It is not something which I type( because the text can change dynamically). e.g
    Column header:  Main Text
    Row1:            <<COMPANY_NAME>>
    Row2:           As of <<AF_OF_DATE>>
    instead of <<COMPANY_NAME>> and <<AS_OF_DATE>>, I need to insert amounts from another table which have this unique tags and associated amounts. Can this be done?
    I have to these columns in different places throughout the report in narrative views. e.g
    1st narrative view will have only column 1 and row 1 and row 2.. 2nd narrative view will have only column 3 and row1...
    This is really really important part of a report. So please help me out with ideas.
    Thanks,
    Dan

    I tried calling the column in a narrative view and the result looks like :
    As of <<AS_OF_DATE>>. how can I replace "<<AS_OF_DATE>>" with a value?

  • APEX 3.1 replaces HTML tags in error message automatically

    Hello!
    I have a problem: we use sometimes HTML links or even JavaScript in error messages. In older versions of APEX it works, but now we upgraded to 3.1 and in all those messages HTML tags are replaced so instead of link we get a plain HTML in a message.
    Are there any possibilities to turn this option off or what can we do to solve this problem?
    Regards,
    Maksim

    In a page process we use raise_application_error(-20547, 'Go to GOOGLE') and in a Process Error Message
    we use constuction Error: #SQLERRM#. Then on an standard error page we see instead of Error: Go to Google html source. Thats it. In template in Error Page Template Control section we use substitution #MESSAGE#

  • Replace HTML tags in RTE

    Hi All,
                   I've requirement that I need to replace the html tags in RTE, I checked find and replace plugin, which only replace the text not the tags. The CQ.form.rte.SearchableDocument returns the plain text. Can anybody tell me how to replace the tags?, is there any existing plugin's available ?
    Thanks in advance
        Ganesh

    Hi Ganesh,
        You can configure the rich text editor to use semantic markup, so that the bold=strong and italic=em will be modified in the html out. Not sure it applies for other tags. Give a try.
    http://forums.adobe.com/message/4652639#4652639
    Thanks,
    Sham

  • How to change inner content of HTML tag using HTMLDocument?

    I want to change the inner content of an HTML tag from a HTMLDocument. The tag is like
    <span id ="id1">Replace me</span>.
    So I want to change the text "Replace me" inside the span tag and replace it with an other text.
    I can get the span element using
    HTMLDocument.getElement("id1")
    I have tried many things with the Element instance i got from getElement. But I find no way to change the inner content of the HTML element. Any ideas?

    If I use JDK 1.5 the SPAN tag works, so I checked the core of the problem which is inserting HTML code in an HTML tag.
    setInnerHTML works fine for block tags like DIV but not if the tag is a leaf element like the SPAN tag. I have tried to use the following code for leaf elements:
    Element elem = m_htmlDocument.getElement(id);
    int nStartOffest = elem.getStartOffset();
    int nEndOffset = elem.getEndOffset();
    int nLength = nEndOffset - nStartOffest;
    m_htmlDocument.replace(nStartOffest, nLength, html, elem.getAttributes());
    This works, but only if the new HTML string does not contain HTML tags like a link <href..... >. If the string contains HTML tags the replace method masks all characters like < or >. So the link is not shown as link in the HTML page but as HTML text.
    The next thing I have tried is using
    m_htmlDocument.setOuterHTML(elem, html);
    This works too but it replaces the whole original HTML element like the SPAN tag.
    So there is still the question how to insert HTML text into a leaf Element in a HTMLDocument.

  • How to use Microsoft Word's Find and Replace with HTML tags?

    Hello to all!
    I'm trying to figure out how to use the find and replace function in Word to replace html tags. I'd like to be able to change something like this:
    <span class="B01-K-ITAL">random text</span>
    To something like this:
    <em>random text</em>
    I want to replace the open and close tags without changing or interfering with the text between the tags. I'm pretty sure I should use wildcards, but I can't figure out how to use them properly.
    Anyone able to lend a hand?

    Here is my latest regular expression with Perl.   I think it matches the spirit of the request in the original post.
    Note, this isn't as easy as you think.  You need to code up the complete set of html rules in you implementation. You need to allow for a certain amount of mal-formed html.
    perl -0660pe 's^<[sS][pP][aA][nN]\s+class="B01-K-ITAL"\s*>(.*?)</[sS][pP][aA][nN]>^<em>$1</em>^gs' i.html >|o.html
    input text
     <html> <head>...</head> <body>I'd like to be able to change something like this: <span class="B01-K-ITAL">#1 one line</span> I want to replace the open and close tags without changing or interfering with the text between the tags. I'm pretty sure I should use wildcards, but I can't figure out how to use them properly. <p>note, this isn't as easy as you think.  You need to code up the complete set of html rules in you implementation. You need to allow for a certain amount of mal-formed html.</p> <span class="B01-K-ITAL">#2 don't be greedy</span> <span class="B01-K-ITAL">$3 multiline text</span> <span class="B01-K-ITAL">#4 multiline tag. I believe html allow a carriage return in white space of tags</span> <span class="B01-K-ITAL">#5 split after the class tag. optional white space</span> <sPan class="B01-K-ITAL">#6 mixed case tag</Span> <p>no text #7</p><span class="B01-K-ITAL"></span> <!-- Apparently, this is valid     http://www.positioniseverything.net/articles/cc-plus.html --> <!--[if IE]> <div id="IEroot"> <![endif]--> <p id="IE">This browser is IE.</p> <p id="notIE">This browser is not IE.</p><!--[if IE]> </div> <![endif]--></body> </html>
    output text
     <html> <head>...</head> <body>I'd like to be able to change something like this: <em>#1 one line</em> I want to replace the open and close tags without changing or interfering with the text between the tags. I'm pretty sure I should use wildcards, but I can't figure out how to use them properly. <p>note, this isn't as easy as you think.  You need to code up the complete set of html rules in you implementation. You need to allow for a certain amount of mal-formed html.</p> <em>#2 don't be greedy</em> <em>$3 multiline text</em> <em>#4 multiline tag. I believe html allow a carriage return in white space of tags</em> <em>#5 split after the class tag. optional white space</em> <em>#6 mixed case tag</em> <p>no text #7</p><em></em> <!-- Apparently, this is valid     http://www.positioniseverything.net/articles/cc-plus.html --> <!--[if IE]> <div id="IEroot"> <![endif]--> <p id="IE">This browser is IE.</p> <p id="notIE">This browser is not IE.</p><!--[if IE]> </div> <![endif]--></body> </html>

  • Displaying content in JSP page, want BR but not other Html tags

    I have a page and am reading files and displaying the contents of the files onto the page in a <div> Oneissue is that in the file the end of line are \n or \r\n whichever operation system. I replaced those with <BR> no problem. Now my issue is that I display that in the JSP page:
    <c:out value="${filecontents}" escapeXml="false" />I use escapeXml so that <BR> will add the line breaks. Now my issue is that the file might contains other HTML tags that I want to display simply as text - I don't want the browser to render the other HTML tags.
    Is there a way to do that? Would I have to replace HTML tags with something special?

    Hmm... your file contains HTML tags, but you don't want the browser to interpret them as HTML tags, right? So the way to do that is to use escapeXml="true" in your c:out element.
    But then that also escapes the <BR> tags that you carefully put in there. And you don't want that. You want the browser to interpret those as HTML tags.
    I guess you can't have it both ways. Can you do something like outputting one line of the file at a time with <c:out ... escapeXml="true"> followed by <br>?

  • Error in my CODE- replace data in html tags in APPLET

    MY REQUIREMENT:
    I'm trying to send html format of output to an excel file....As you can see my data in the td tag had data as: 
    BRANCHOFFICE<125 & BRANCHOFFICE>176 where < is interpreted as an html tag....So I want to replace
    < -> <
    < -> >
    & -> &
    <HTML>
    <table border="1">
    <tr>
    <td>BRANCHOFFICE<125 & BRANCHOFFICE>176</td>
    </tr>
    </table>
    </HTML>
    MY ERROR IN CODE:
    So I'm testing my replace method in a small snippet.........
    So the steps my code works is:
    1)BRANCHOFFICE<125 & BRANCHOFFICE>176 gets converted to
    BRANCHOFFICE<125 & BRANCHOFFICE>176
    2)BRANCHOFFICE<125 & BRANCHOFFICE>176 gets converted to
    BRANCHOFFICE<125 & BRANCHOFFICE>176
    3)when it comes to the third & conversion it goes to a infinte loop....
    CAN U PLS HELP ME TO SOLVE THIS BUG........
    import java.applet.Applet;
    import java.io.*;
    public class escape
    public static void main(String arg[])
    String s1 = "BRANCHOFFICE<125 & BRANCHOFFICE>176";
    System.out.println("s1 = " + escape(s1));
    private static String escape(String s)
    while( true )
    int index = s.indexOf('<');
    if ( index != -1 )
    String before = s.substring( 0, index );
    String after = s.substring( index+1, s.length() );
    s = before + "<" + after;
    continue;
    index = s.indexOf('>');
    if ( index != -1 )
    String before = s.substring( 0, index );
    String after = s.substring( index+1, s.length() );
    s = before + ">" + after;
    continue;
    index = s.indexOf('&');
    if ( index != -1 )
    String before = s.substring( 0, index );
    String after = s.substring( index+1, s.length() );
    s = before + "&" + after;
    continue;
    break;
    return s;
    }

    Jdk 1.4:import java.applet.Applet;
    import java.io.*;
    public class escape
         public static void main(String arg[])
              String s1 = "BRANCHOFFICE<125 & BRANCHOFFICE>176";
              System.out.println("s1 = " + escape(s1));
         private static String escape(String s)
              s = s.replaceAll ("&", "&");
              s = s.replaceAll ("<", "<");
              s = s.replaceAll (">", ">");
              return s;
    }<= Jdk 1.3:import java.applet.Applet;
    import java.io.*;
    public class escape
         public static void main(String arg[])
              String s1 = "BRANCHOFFICE<125 & BRANCHOFFICE>176";
              System.out.println("s1 = " + escape(s1));
         private static String escape(String s)
              s = replace (s, "&", "&");
              s = replace (s, "<", "<");
              s = replace (s, ">", ">");
              return s;
         private static String replace(String original, String find, String replacement) {
              int i=0;
              if ((i=original.indexOf(find)) > -1) return original.substring(0, i) + replacement
                   + replace(original.substring(i+find.length()), find, replacement);
              else return original;
    }

  • Replace function for HTML tags

    Hie Guys,
    I would like to get rid of the HTML tags from a column/object in my report using the "Replace" function. Basically, I want to replace whatever the content is between "<" & ">" i.e. the opening and closing tags. I know I can use the "Pos" function to identify the position of "<" & ">", but I am not sure exactly how to achieve this in Webi. FYI -  "Read content as HTML" & "Read content as Hyperlink" did not resolve the issue. Can anyone please help? Thanks.

    Hi Jeewan,
    It will be very tedious to do this at Webi level.
    I have tried below example. It might help you to work around your issue; however, not completely:
    1. Created an Excel and inserted single value in first column as:
    <html><b>this is yuvraj</b></html>
    2. Used it as source and created a Webi report in Rich client.
    3. Applied SubStr recursively using Pos function and created below variables:
    test : =Substr([column_1]; Pos([column_1];">")+1;Length([column_1]))
    test1: =Substr([test]; Pos([test];">")+1;Length([test]))
    test2 : =Substr([test1]; 0;Pos([test1];"<")-1)
    The output has been attached.

  • HTMLDocument.getText() issue: HTML tag br is translated to ' ' (space)??

    HTMLDocument.getText() issue:
    <br> (HTML.Tag.BR) is translated to ' ' (space), but I've expected the '\n'!
    I have the HTMLDocument that contains
    <html><body>
    <br>
    <br>
    <br>
    SOMETEXT
    <br>
    </body></html>
    The JTextPane is perfectly showing this formatting, but after I translate the HTML to plain text using
    getText(o, getDocument().getLength())
    I receiving the " SOMETEXT "? all line brakes are lost! I have only spaces instead line brakes! (using <p></p> instead of <br> in general is not solution)
    Help me please! It's not normal to make the manual "html to plain text" translation..
    Strange that I can't find any existing solutions here...
    JDK1.4.1 and 1.4.2_03

    Here is the sample of how I get the plain text from HTMLDocument:
    HTMLDocument htmlDocument = (HTMLDocument)getDocument();
    String plainText = htmlDocument.getText(0, this.getDocument().getLength());
    "... SOMETEXT..."
    plainText string contains plain text
    the same document - alternative way to get the HTML file from this document:)
                   HTMLDocument htmlDocument = (HTMLDocument)getDocument();
                   Writer w = new FileWriter(new File("/home/ovrubl/temp/AAAAAAAAAAAAAAAAAAAA"));
                   htmlEditorKit.write(w, htmlDocument, 0, htmlDocument.getLength());
                   w.flush();
                   w.close();
    <br>
    <br>
    <br>
    SOMETEXT
    I'm looking for solution how to get
    "...\n\n\nSOMETEXT..." from htmlDocument.getText(0, this.getDocument().getLength())

  • RegExp for replacing specific HTML tags.

    Hi All,
    I need to replace some of the HTML tags in flex.
    for eg:-
    in the follwing html i have to replace "span","div" and "a"
    <h2>AAAAAAAAA<br /><span >BBBBBBBBBBB</span></h2><div><p>QQQQQQ</p><p>EE<br />FFFF<br />TTT<br /></p
    <a href="#">Click</a>
    </div>

    input = "yor html string";
    var urlPattern:RegExp = new RegExp("/(<a)(.*)(</a)/","ig");
    var result:String = input.replace(urlPattern, "<b$2</b"); 
    var urlPattern2:RegExp = new RegExp("/(<div)(.*)(</div)/","ig");
    var result2:String = result.replace(urlPattern2, "<table$2</table"); 
    and so on....
    hope this helps ...

  • Replace everything except in html tags

    I have this little piece of code hilighting words in search
    results, however, it obviously replaces text in html tags as well
    and I want it to omit all html. I've also noticed that
    replacenocase replaces the case of my words...while it does search
    for words no matter the case, I sure wish it wouldn't replace the
    case of the original text. Any tips would be greatly appreciated.
    <cfset variables.hiliteSummary =
    ReplaceNoCase(siteSearch.summary,url.criteria,"<span
    class=searchHilite>#url.criteria#</span>","ALL")>

    to fix your issue with case, use a rereplace and
    backreferences:
    rereplaceNoCase(siteSearch.summary, '(#url.criteria#)',
    '<span class="searchHilite">\1</span>', 'all')

  • Remove HTML tags without REPLACE

    Hello,
    I have a simple query that returns some data, but the result could have html tags. I don't want to keep using REPLACE because sometimes I receive a tag that is not included in the REPLACE function. Is there is a way to do that, may be using some XML code?
    Thank you

    With a CTE
    like that 
    ALTER FUNCTION dbo.fnHtmlStripFreeLight 
    @inputStringCleaned VARCHAR(MAX) /*,@inputStringCleaned2 VARCHAR(MAX),@inputStringCleaned3 VARCHAR(MAX),
    @inputStringCleaned4 VARCHAR(MAX),@inputStringCleaned5 VARCHAR(MAX),
    @inputStringCleaned6 VARCHAR(MAX),
    @inputStringCleaned7 VARCHAR(MAX),
    @inputStringCleaned8 VARCHAR(MAX),@inputStringCleaned9 VARCHAR(MAX), @inputStringCleaned10 VARCHAR(MAX),@inputStringCleaned11 VARCHAR(MAX),
    @inputStringCleaned12 VARCHAR(MAX),
    @inputStringCleaned13 VARCHAR(MAX), @inputStringCleaned14 VARCHAR(MAX)*/
    RETURNS @freeHtml TABLE (
    col1 VARCHAR(MAX)/*,col2 VARCHAR(MAX),col3 VARCHAR(MAX),col4 VARCHAR(MAX),col5 VARCHAR(MAX),
    col6 VARCHAR(MAX),
    col7 VARCHAR(MAX),col8 VARCHAR(MAX),col9 VARCHAR(MAX),
    col10 VARCHAR(MAX),
    col11 VARCHAR(MAX), col12 VARCHAR(MAX),
    col13 VARCHAR(MAX),col14 VARCHAR(MAX)*/
    AS 
    BEGIN 
        DECLARE @output VARCHAR(MAX)=''/*, @output2 VARCHAR(MAX)='',@output3 VARCHAR(MAX)='', @output4 VARCHAR(MAX)='',@output5 VARCHAR(MAX)='', @output6 VARCHAR(MAX)='',@output7 VARCHAR(MAX)=''
    DECLARE @output8 VARCHAR(MAX)='', @output9 VARCHAR(MAX)='',@output10 VARCHAR(MAX)='', @output11 VARCHAR(MAX)='',@output12 VARCHAR(MAX)='', @output13 VARCHAR(MAX)='',@output14 VARCHAR(MAX)=''*/
        DECLARE @max_recursion INT
       SELECT @max_recursion =MAX(dim)
       FROM (SELECT dim
        FROM (VALUES (LEN(@inputStringCleaned))/*,(LEN(@inputStringCleaned2 )),
     (LEN( @inputStringCleaned3)),(LEN(@inputStringCleaned4)),(LEN(@inputStringCleaned5)),(LEN(@inputStringCleaned6)),(LEN(@inputStringCleaned7)),(LEN(@inputStringCleaned8))
     ,(LEN(@inputStringCleaned9)),(LEN(@inputStringCleaned10)),(LEN(@inputStringCleaned11)),(LEN(@inputStringCleaned12)),(LEN(@inputStringCleaned13)),(LEN( @inputStringCleaned14))*/
     ) as L (dim)
    ) as Q
        ;WITH Split
        AS(
            SELECT 
                1 AS stpos, 
                SUBSTRING(@inputStringCleaned,1,1) as Stream1, 
    SUBSTRING(@inputStringCleaned,2,1) as StreamNext, 
                CASE  WHEN  SUBSTRING(@inputStringCleaned,1,1) IN ('<','>') THEN 0 ELSE 1 END as isShow1
             /*   SUBSTRING(@inputStringCleaned2,1,1) as Stream2, 
    SUBSTRING(@inputStringCleaned2,2,1) as StreamNext2, 
                CASE  WHEN SUBSTRING(@inputStringCleaned2,1,1) IN ('<','>') THEN 0 ELSE 1 END as isShow2*/
            UNION ALL
            SELECT 
                      stpos+1,        -- premier flux
    StreamNext, 
    SUBSTRING(@inputStringCleaned,stpos+2,1),
                          CASE  WHEN StreamNext IN ('<','>') THEN 0
                                      WHEN Stream1 IN ('>') AND isShow1 = 0 THEN 1
                                      WHEN Stream1 NOT IN ('<','>') AND isShow1 = 1 THEN 1  ELSE 0 END,
                                      -- second flux
    /*  StreamNext2,
                                      SUBSTRING(@inputStringCleaned2,stpos+2,1)
                          CASE  WHEN StreamNext2 IN ('<','>') THEN 0
                                      WHEN Stream2 IN ('>') AND isShow2 = 0 THEN 1
                                      WHEN Stream2 NOT IN ('<','>') AND isShow2 = 1 THEN 1  ELSE 0 END */
            FROM Split
            WHERE stpos <= @max_recursion
    SELECT @output+= CASE WHEN isShow1  = 1 THEN Stream1    ELSE '' END FROM Split  OPTION (MAXRECURSION 8001)
    SELECT @output = REPLACE(@output, '&nbsp;','')
    INSERT INTO @freeHtml
    SELECT CASE  WHEN @inputStringCleaned IS NULL THEN CAST(NULL as VARCHAR) ELSE @output END
    RETURN
    END

Maybe you are looking for

  • Ibook doesn't display files/dock etc.

    Hi. I hope I'm in the right forum. My iBook is about 3 years old, I bought it used. A couple days ago the copy/paste function stopped working (I could copy/cut, but I couldn't paste anything) I restarted it, but ever since it starts up as normal (chi

  • ClassNotFoundException JDBCDriver for oracle

    I am trying to configure a jsp/servlet application with tomcat 4.0.6 . The database is Oracle8i. THe problem is, its not able to find the driver. I get a ClassNotFoundException as below. I have class12.zip and classes111.zip in my TOMCAT_HOME/lib, TO

  • What is the best image format to use for importing images into a Pages document?

    Image quality is good in photoshop. I am currenlty saving as .tiff at 300 dpi but when I import the image in the resolution diminishes radically.

  • New field on field catelogue

    Hi For a discount condition type I want to create a new condition table with a filed which is not in filed catelogue. So what and all the entire procedure I have to do. thns & rgds raju

  • Why can't I reinstall Photoshop Elements 9

    I've contacted tech support about deactivating Photoshop elements 9 from an old computer and reinstalling it on a new computer. I have done everything I was told to do but I still cannot install it properly on the new computer. The old computer had M