Using HTML tags in XML

Trying to bring in an xml document that contains HTML tags but I can't seem to get it working.
I have a bit of AS and a basic text field in a movie clip for now. I've pared it down as simply as I can to the following AS:
var languageXML:XML = new XML();
var nav:Array = new Array();
languageXML.ignoreWhite = true;
languageXML.load("code.xml");
languageXML.onLoad = function(success) {
    var currentNavNode:XMLNode = this.firstChild.firstChild;
    var i:Number = 0;
    for (var childNode = currentNavNode; childNode != null; childNode=childNode.nextSibling, i++) {
        for (var stringNode:XMLNode = childNode.firstChild; stringNode != null; stringNode=stringNode.nextSibling, j++) {
            _root.feature0 = stringNode.firstChild.nodeValue
    //all the xml has now loaded so we're good to kick off the full nav
    _root.textWin.myText.html = true;
    _root.textWin.myText.htmlText = _root.feature0;
Whilst my XML doc looks like this:
<?xml version="1.0" encoding="utf-8"?>
<feed>
<item>
    <body><![CDATA[This<br>Should<br><br>Be fine.]]></body>
</item>
</feed>

does trace(_root.textWin.myText+" "+_root.textWin.myText.multiline) show that you have a multline textfield?  if not, fix that.

Similar Messages

  • How to Include html tag in xml

    Hi,
    Is there any way to include html tags in xml?
    For Example, I'm using xsl to get the value of FIELD_1 from fetch.xml
    In fetch.xml, I have the tag
    <FIELD_1>
    <font color='#8080ff'>&#160;<font face='Times New Roman, Times' size='28'>Testing font and color</font></font>
    </FIELD_1>
    But If I tried to read the value from xsl like <xsl:value-of select="FIELD_1"/> I'm just gettig the display 'Testing font and color' without the specified font and color....
    How to achieve this?
    Thanks
    Selva.

    Hi,
    Thanks for the input.
    I tried with the below code
    <fo:block space-after="5mm" font-family="Arial"><xsl:copy-of select="FIELD_1"/></fo:block>
    But I'm getting the below error...
    "An invalid XML character (Unicode: 0xa0) was found in the element content of the document."
    Below is the code included in the xsl....
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
    <xsl:output method="xml" indent="yes"/>
    <xsl:template match="Values"><fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
    <fo:layout-master-set>
    <fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm" margin-top="3cm" margin-bottom="2cm" margin-left="2cm" margin-right="2cm">
    <fo:region-body/>
    </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="simpleA4">
    <fo:flow flow-name="xsl-region-body">
    <fo:block space-after="5mm" font-family="Arial"><xsl:copy-of select="FIELD_1"/></fo:block>
    </fo:flow> </fo:page-sequence> </fo:root> </xsl:template></xsl:stylesheet>
    Is there any mistakes in the above code?
    Regards,
    Selva.

  • How to use HTML Tags in Smartforms

    Hi,
    Can you please help me out in knowing how to use HTML tags in Smartforms,
    suppose i want to display some text in BOLD i should use the tag </b> as shown
    </b>  Header Information <b>
    regards
    Ranveer

    Hi Ranveer ,
        check this following links,
      hope this wil helps you
    <a href="http://sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/smartforms/smartform%20in%20abap.pdf">check this link,to know abt HTML in smartforms</a>
    rgds,
    shan

  • I want to display BLOB image in JSP Using  html tags IMG src=

    GoodAfternoon Sir/Madom
    I Have got the image from oracle database but want to display BLOB image using <IMG src="" > Html tags in JSP page . If it is possible than please give some ideas or
    Send me sample codes for display image.
    This code is ok and working no problem here Please send me code How to display using html tag from oracle in JSP page.
    <%@ page import="java.sql.*" %>
    <%@ page import="java.io.*" %>
    <%@ page import="javax.swing.ImageIcon;" %>
          <%
            out.print("hiiiiiii") ;
                // declare a connection by using Connection interface
                Connection connection = null;
                /* Create string of connection url within specified format with machine
                   name, port number and database name. Here machine name id localhost
                   and database name is student. */
                String connectionURL = "jdbc:oracle:thin:@localhost:1521:orcl";
                /*declare a resultSet that works as a table resulted by execute a specified
                   sql query. */
                ResultSet rs = null;
                // Declare statement.
                PreparedStatement psmnt = null;
                  // declare InputStream object to store binary stream of given image.
                   InputStream sImage;
                try {
                    // Load JDBC driver "com.mysql.jdbc.Driver"
                    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
                        /* Create a connection by using getConnection() method that takes
                        parameters of string type connection url, user name and password to
                        connect to database. */
                    connection = DriverManager.getConnection(connectionURL, "scott", "root");
                        /* prepareStatement() is used for create statement object that is
                    used for sending sql statements to the specified database. */
                    psmnt = connection.prepareStatement("SELECT image FROM img WHERE id = ?");
                    psmnt.setString(1, "10");
                    rs = psmnt.executeQuery();
                    if(rs.next()) {
                          byte[] bytearray = new byte[1048576];
                          int size=0;
                          sImage = rs.getBinaryStream(1);
                        //response.reset();
                          response.setContentType("image/jpeg");
                          while((size=sImage.read(bytearray))!= -1 ){
                response.getOutputStream().write(bytearray,0,size);
                catch(Exception ex){
                        out.println("error :"+ex);
               finally {
                    // close all the connections.
                    rs.close();
                    psmnt.close();
                    connection.close();
         %>
         Thanks

    I have done exactly that in one of my applications.
    I have extracted the image from the database as a byte array, and displayed it using a servlet.
    Here is the method in the servlet which does the displaying:
    (since I'm writing one byte at a time, it's probably not terribly efficient but it works)
         private void sendImage(byte[] bytes, HttpServletRequest request, HttpServletResponse response) throws IOException {
              ServletOutputStream sout = response.getOutputStream();
              for(int n = 0; n < bytes.length; n++) {
                   sout.write(bytes[n]);
              sout.flush();
              sout.close();
         }Then in my JSP, I use this:
    <img src="/path-to-servlet/image.jpg"/>
    The name of the image to display is in the URL as well as the path to the servlet. The servlet will therefore need to extract the image name from the url and call the database.

  • How to use HTML Tags in webdynpro java

    Hi,
         Can any body tell me how to use HTML Tags in webdynpro java.
    If u provide me with sample code it will become more usefull.
    Thanks & Regards,
    SN

    HI,
    Please find the steps:
    Create a html file and store in your webdynpro project
    Add the html contents in your file
    & Create a IFRAME UI element and refer you html file
    Now you able to see the html in webdynpro
    Thanks & Regards,
    Ram

  • Unable to use HTML tags in the BPEL email component

    Hi,
    I am using BPEL email component to send mail notifications. I want the email should be in proper format.If I use HTML tags the workflow application build fails .It says invalid syntax for html tags.So, I removed the tags and just using the concat string operations as of now.To format i even tried '\n' like in java but it didnt help. Could you please let me know how do I achieve this?
    The JDeveloper version is 11.1.1.3 and SOA ,OIM both are 11.1.1.3
    The BPEL source code for the email content I configured is:
    <copy>
    <from expression="concat(string('AD Account access request has been rejected by manager.\n
    Here are some details about the request:\n
    Request ID : '), bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:RequestID'),string('\n'),
    string('Employee First Name : '),bpws:getVariableData('empFName'),string('\n'),
    string('Employee Last Name : '),bpws:getVariableData('empLName'),string('\n'),
    string('Manager Employee ID : '),bpws:getVariableData('manager'),string('\n\n\n'),string('Thanks,\n IDM Administration')
    )"/>
    <to variable="varNotificationReq"
    part="EmailPayload"
    query="/EmailPayload/ns15:Content/ns15:ContentBody"/>
    </copy>
    Please suggest .
    Thanks,
    Piyasa

    Hi
    Here is the sameple email from BEPL email component. See if this helps:
    "<html>&#x0A;<body>&#x0A;<p>This is an automated message from the <b>Identity Provisioning Solution</b>. Please don’t reply to this email.</p>&#x0A;&#x0A;<p>An access request has been successfully submitted for <%concat(bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:BeneficiaryDetails/ns4:FirstName'),' ',bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:BeneficiaryDetails/ns4:LastName'))%> to access <%bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:ObjectDetails/ns4:name')%>.</p>&#x0A;&#x0A;To view additional details of the request, login to the Identity Provisioning Solution.&#x0A;&#x0A;<br>Request ID: <%bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:RequestID')%>&#x0A;<br>&#x0A;<br>&#x0A;<br>&#x0A;<br>Thank you,&#x0A;<br>Identity and Access Management&#x0A;</body>&#x0A;</html>&#x0A;"
    Regards
    user12841694

  • Can i use HTML tag in text when sending contens as "Attachement(PDF)".

    Hi all!!
    i try to add html tag on ibot email text column.
    is it possible?
    - in ibot delivery content.
    send content as Attachment(PDF)
    "if sent as attachement, include this text" <--- mark this field
    and below multi line input column, can i use html tag, for example,
    Yahoo
    thanks in advance.
    Edited by: vingorius on 2010. 10. 31 오후 7:27

    hi vingorius ,
    No you cant include html but u can use variables
    To add a variable in a text message to provide context for the iBot attachment
    1. Click the following option:
    If sent as attachment, include this text
    2. Type the text into the text box with a session variable, a repository variable, or a presentation variable using the syntax shown in the following table:
    Variable Type
    Syntax
    Repository @{Variable_Name}
    Session @{NQ_SESSION.Variable_Name}
    Presentation @{Variable_Name}
    For example, Dear, @{NQ_SESSION.Variable_Name}, here is your personalized Weekly Sales Territory Update.
    NOTE: If you want to use the @ character, you need to precede it with the \ (back slash) character to separate it from the variable syntax. For example, Dear @{NQ_SESSION.DISPLAYNAME}, \@ New York, appears as Dear Joe Smith, @ New York.
    Source : BI Guide
    Thanks,
    Saichand.v

  • How to use HTML tags inside JSF pages

    I am creating a Menu using dataTable and outputLink in a JSF page.
    <div class="bodyarea">
    <div id="location">
    <ol>
    <h:dataTable value="#{menuItem.breadCrumb}" var="bread" >
    <h:column>
    <li>
    <h:outputLink id="crumbID" value="#{bread.menuLink}">
    <h:outputText id="crumpName" value="#{bread.menuLabel}" style="width: 165px;"/>
    </h:outputLink>
    <li>
    </h:column>
    </h:dataTable>
    </ol>
    </div>
    </div>
    I want to use <li> HTML tag as shown in code above before and after every <tr> tag formed, but when i run it and see view source, this is how it shows:
    NOTE: you can see it has thrown out of <table> tag itself.
    <div class="bodyarea">
    <div id="location">
    <ol>
    <li>
    </li>
    <table>
    <tbody>
    <tr>
    <td><a id="_id0:0:crumbID" href="/eApps/admin/loginPage.jsp?MenuItem=-1"><span id="_id0:0:crumpName" style="width: 165px;">Home</span></a></td>
    </tr>
    <tr>
    <td><a id="_id0:1:crumbID" href="/eApps/admin/loginPage.jsp?MenuItem=3~-1"><span id="_id0:1:crumpName" style="width: 165px;">HIM Admin</span></a></td>
    </tr>
    </tbody>
    </table>
    </ol>
    </div>
    </div>
    Can some one help me, how do i use HTML tags inside <h:dataTable>.
    Or is their any other way i should form my Menus, to fully utilize to HTML tags.
    Thanks
    Ravi

    Hello,
    You can embed the verbatim elements in your datatable, ie,
    <h:dataTable value="#{menuItem.breadCrumb}" var="bread" >
      <h:column>
        <f:verbatim><li></f:verbatim>
        <h:outputLink id="crumbID" value="#{bread.menuLink}">
          <h:outputText id="crumpName" value="#{bread.menuLabel}" style="width: 165px;"/>
        </h:outputLink>
        <f:verbatim></li></f:verbatim>
      </h:column>
    </h:dataTable>

  • Background color using html tag

    Hi all,
    I hve to give background color using html tag , Please suggest
    and if can do in sql for background colour tag.
    Help me on this .
    Regards, Subathra

    just take placeholder property and select HTML option as below
    Then inside textbox you can use expression like below
    ="<FONT color=""green"">" & Fields!YourField.Value & "</FONT>"
    and text will show in green color. you can specify color of your choice
    But I would also prefer using standard property of textbox to set the color
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • HTML tags in XML document

    I have an application that loads information from an XML file
    and displays in a dynamic text box. That works great. Now, I want
    to add HTML tags to the information in the XML file so the dynamic
    text box will format it. If I add straight html:
    <Answer1>of earth, <b>air</b>, fire, and
    water.</Answer1>
    I get a null displayed in the text box. If I encode
    <Answer1>of earth,
    &gt;b&lt;air&gt;/&lt;, fire, and
    water.</Answer1>
    Then it displays
    of earth, <b>air</b>, fire, and water.
    Any help on how to embedded html code into an XML document so
    a dynamic text box uses the html code?
    Thanks.

    Just use CDATA tags around your HTML values, eg:
    <Answer1><![CDATA[of earth, <b>air</b>,
    fire, and water.]]></Answer1>
    HTH.

  • How use forEach tag in xml tag library

    Hi,
    Can u please explain the procedure for using forEach tag for displaying the parsed xml tags?
    This is the code snippet
    <%@ page contentType="text/html" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml" %>
    <html>
    <body>
         <c:import url="\books.xml" var="url" />
         <x:parse xml="${url}" var="doc" />
              <x:forEach var="n" select="${doc}/books/book">
                   <x:out select="${n}/title"/>
                   <x:out select="${n}/author" />
         </x:forEach>
    </body>
    </html>
    but I got the fallowing error.
    java.lang.NoClassDefFoundError: org/saxpath/SAXPathException
         at org.apache.taglibs.standard.tag.common.xml.ForEachTag.prepare(ForEachTag.java:51)
         at javax.servlet.jsp.jstl.core.LoopTagSupport.doStartTag(LoopTagSupport.java:262)
         at jsp_servlet.__index._jspService(__index.java:197)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

    Just the same way as you do in JSP. Since JSF 1.2 you can use unified EL #{ } in c:forEach.
    You can also use Tomahawk's [t:dataList|http://myfaces.apache.org/tomahawk-project/tomahawk12/tagdoc/t_dataList.html] by the way. It is more efficient.

  • Put html tag in xml genreted with strings panel

    Hello,
    I created an multilanguage application with the "strings
    "panel.
    My customer need to put some words in italic inside the
    dynamic textfield.
    So I used <i> tag or cdata tag insied the xml, but
    nothing works, even if I put the textfield in "html" format.
    So How can I do.
    Do we need to change the "locale.as" class?
    thanks.
    Regards,

    Is the dynamic text field set to embed the fonts? (Properties
    Panel >
    Character.... radio button clicked to specify ranges)
    If it is, set it to no characters. Also make sure your
    dynamic text field
    is set in the properties panel to render as html.
    Here is a test:
    Create a new Flash document, select the text tool from the
    tools menu and
    create a text area on the stage. Make it a dynamic text field
    in the
    properties panel and click the render as html button. Give it
    an instance
    name of "myText" and on frame one of the main timeline put
    the following
    actionscript.
    myText.htmlText = "<i> This is Italics</i>. This
    is not"
    Test the movie and it should show what you are looking for.
    Dan Mode
    --> Adobe Community Expert
    *Flash Helps*
    http://www.smithmediafusion.com/blog/?cat=11
    *THE online Radio*
    http://www.tornadostream.com
    *Must Read*
    http://www.smithmediafusion.com/blog
    "tof69" <[email protected]> wrote in message
    news:efb464$7cm$[email protected]..
    > Hello,
    > I created an multilanguage application with the "strings
    "panel.
    > My customer need to put some words in italic inside the
    dynamic textfield.
    > So I used
    tag or cdata tag insied the xml, but nothing works, even if
    > I
    > put the textfield in "html" format.
    > So How can I do.
    > Do we need to change the "locale.as" class?
    > thanks.
    > Regards,
    >
    >

  • Html tag in XML and spry

    Hi,
    I have HTML-element in XML doc, but i do not know how to get it out as HTML-element in PHP or in HTML.
    I have this kind of XML tag
    <logo><![CDATA[><a href="http://www.someadress.com"><img src="images/logos/companylogo.jpg" alt="Some Company"/></a>]]></logo>
    I use it in PHP page like this: <td>{logo}</td>
    I get it output in Browser as a String <a href="http://www.someadress.com"><img src="images/logos/companylogo.jpg" alt="Some Company"/></a>.. However I need it print out as an HTML-element not just a string
    Anybody knows how to solve this?
    Juha

    Hi Juha.
    Please have a look at the following.
    This is the XML file called info.xml:
    <?xml version="1.0" encoding="utf-8"?>
    <companies>
        <company>
            <name>Acme Pty Ltd</name>
            <address>23 Rue de Quebec</address>
            <city>Tinseltown</city>
            <website>http://www.acmeptyltd.com</website>
            <logo>logo_acme.jpg</logo>
        </company>
        <company>
            <name>Ajax Cor</name>
            <address>Amsterdamschestraat 203b</address>
            <city>Oranjestadt</city>
            <website>http://www.ajaxbros.com</website>
            <logo></logo>
        </company>
    </companies>
    This is the HTML-markup
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled</title>
    <style>
    .MasterDetail {
        font: 100% Verdana, Geneva, sans-serif;
        margin: 2px;
    .MasterDetail .MasterContainer {
        background-color: #EAEAEA;
        border: 1px solid gray;
        width: 35%;
        float: left;
        overflow: hidden;
    .MasterDetail .MasterColumn {
        font-size: 75%;
        background-color: #CCCCCC;
        padding:5px;
        cursor:pointer;
    .MasterDetail .MasterColumnHover {
        background-color: #EAEAEA;
    .MasterDetail .MasterColumnSelected {
        background-color:#848484;
        color: white;
    .MasterDetail .DetailContainer {
        border: 1px solid gray;
        padding:10px;
        width: 60%;
        float: right;
        overflow: auto;
    .MasterDetail .DetailColumn {
        margin-bottom: 1px;
    </style>
    <script src="SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var ds1 = new Spry.Data.XMLDataSet("info.xml", "companies/company");
    //-->
    </script>
    </head>
    <body>
    <div class="MasterDetail">
      <div spry:region="ds1" class="MasterContainer">
        <div class="MasterColumn" spry:repeat="ds1" spry:setrow="ds1" spry:hover="MasterColumnHover" spry:select="MasterColumnSelected">{name}</div>
      </div>
      <div spry:detailregion="ds1" class="DetailContainer">
        <div class="DetailColumn" spry:if="'{logo}'"><a href="{website}"><img src="{logo}" alt="{name}"/></a></div>
        <div class="DetailColumn" spry:if="!'{logo}'">{name}</div>
        <div class="DetailColumn">{address}</div>
        <div class="DetailColumn">{city}</div>
      </div>
      <br style="clear:both" />
    </div>
    </body>
    </html>
    I hope this helps.
    Ben

  • HTML Tag in Xml

    Hi ,
             i want to render the xml data on my textfield. but it does not support  all the html text given by the " upcoming xml from server".so how to do that , because i want to display the same format of text as it showing on the server side using those Html tag.So waht approach i should follow to do this ,please help me...

    What is the text given by the " upcoming xml from server"?  What html elements are involved?

  • Html tag as xml tag value?

    Hi,
    Can I put a html tag as value to a xml tag? something like this
    <abc>
    <username>Uma</username>
          <displayTag>
                  <start><h1></start>
                  <end></h1></end>
          </displayTag>
    </abc>Please help.
    Thanks in advance.

    You can either use > and < for < and > to get something that appears to be an html tag, or you can use a CDATA section.
    It partly depends on what you plan to do with that content.
    Dave Patterson

Maybe you are looking for

  • Error While Running JasperReport in JSP Page

    Dear All i am running Report JasperReport using JSP and i am sure that i attached jasperreports-3.0.0.jar and i am getting this error net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: C:\Us

  • [CS3 JS] Finding blank paragraphs

    I want to test if a paragraph is blank or just contains space characters. I am using this GREP expression, but it also highlights paragraph returns in paragraphs with text. Any help would be appreciated. ^\x20* Rick Quatro

  • Position Function for Netezza

    We are trying to update the Netezza.PRM file to include the Position function.  When using it in Designer we get a Parse error that it found a comma (,) when it was expecting 'In' or 'Op' or '=='r '<' or '>'.  Does anyone know the correct parameters

  • I dont want saved pdf documents to be opened automatically...Reader XI.

    I m using a software which generates few reports a day and I get to save them which is usually pdf. But as its default settings to open pdf is adobe,it automatically opens it after being saved.Anyway to change that setting? Thanks alot in advance...

  • Planned AS support matrix?

    Hi all, I know the technical preview of JDev 11 doesn't support anything but standalone/embedded OC4J. But is there a specific planned support matrix for production? In particular, I have several clients who are still on Oracle AS 10.1.2. Will this d