special characters in XML


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: special characters in XML

  1. #1
    marlene leach Guest

    special characters in XML


    I am having problems trying to display an XML node using XSL when the node
    contains special characters. I have tried using an example from one of your
    previous discussions as follows:
    <xsl:eval no-entities='true'>this.nodeValue<xsl:eval>

    Here is my XML
    <news_text>
    link to <![CDATA[<a href="http://www.yahoo.com">Yahoo</a>]]here.
    </news_text>

    Here is my XSL
    <xsl:template match="news_text/text()">
    <xsl:eval no-entities='true'>this.nodeValue<xsl:eval>

    with this code I get absolutely nothing on the web page

    if I use
    <xsl:template match="news_text>
    <xsl:value-of />

    Then the web page displays

    link to <a href="http://www.yahoo.com">Yahoo</a> here.

    I want my this data to display as a link. Is this possible?


  2. #2
    marlene leach Guest

    Re: special characters in XML


    "marlene leach" <mleach@edd.ca.gov> wrote:
    >
    >I am having problems trying to display an XML node using XSL when the node
    >contains special characters. I have tried using an example from one of

    your
    >previous discussions as follows:
    > <xsl:eval no-entities='true'>this.nodeValue<xsl:eval>
    >
    >Here is my XML
    ><news_text>
    > link to <![CDATA[<a href="http://www.yahoo.com">Yahoo</a>]]here.
    ></news_text>
    >
    >Here is my XSL
    ><xsl:template match="news_text/text()">
    > <xsl:eval no-entities='true'>this.nodeValue<xsl:eval>
    >
    >with this code I get absolutely nothing on the web page
    >
    >if I use
    ><xsl:template match="news_text>
    > <xsl:value-of />
    >
    >Then the web page displays
    >
    > link to <a href="http://www.yahoo.com">Yahoo</a> here.
    >
    >I want my this data to display as a link. Is this possible?


    I forgot to mention that my project requires that I use msxml 2.5
    and IE5.5 as the browser.


    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center