Results 1 to 4 of 4

Thread: XML "<" character?

  1. #1

    Thread Starter
    Addicted Member wernerh's Avatar
    Join Date
    Sep 2000
    Posts
    170

    XML "<" character?

    Hi
    I have the following node in a xml doc:

    <message>when the amount is < 1000 bla bla bla </message>

    My question is: how can I display the text of the message tag, seeing that the "<" char is invalid in the xml doc.

    or is it possible to include "<br>" in my xml doc so that when I write the contents of a large noge with xsl to html, there would be a break??

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    1) &lt;
    2) <br />
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Addicted Member wernerh's Avatar
    Join Date
    Sep 2000
    Posts
    170
    It doesnt seem to work. If I put &lt; into the text of my node and render it with my xsl , all I see is "when the amount is lt; 1000 bla bla bla "

    when i put <br /> into my xml file, all I see is "when the amount is 1000 bla bla bla "
    ???

  4. #4
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    You need to use the 'disable-output-escaping' attribute to render the output correctly:

    Code:
    	<xsl:template match="MESSAGE">
    		<xsl:value-of select="." disable-output-escaping="yes"/>
    	</xsl:template>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width