Click to See Complete Forum and Search --> : Need help displaying XML data (tags included) in HTML table


loveToBlade
03-20-2006, 02:21 PM
Maybe I'm just having a doughhead kind of day. This seems like it should be easy, but I haven't found the answer yet. I have a <TD> tag that looks like this:

<TD>
<SMTP><ID>4</ID><TYPE>AAA</TYPE><SENDER>test@test.com</SENDER><RECIPIENT>b@b.com</RECIPIENT><SUBJECT>TestFormat</SUBJECT><MESSAGE><b>This is my message</b></MESSAGE></SMTP>
</TD>

I the table cell to display exactly what is contained within the <TD> tag, but it's stripping off all of the tags. Anybody know what I need to do to display the tags? :confused:

pk_mkhalid
03-21-2006, 06:41 AM
What is the xsl code you are using for displaying this?

loveToBlade
03-21-2006, 11:51 AM
I don't have any XSL code, this is not populated from an XML file, this is populated from a database field. It's a string field, but formatted like XML. So, <SMTP><ID>4</ID><TYPE>AAA</TYPE><SENDER>test@test.com</SENDER><RECIPIENT>b@b.com</RECIPIENT><SUBJECT>TestFormat</SUBJECT><MESSAGE><b>This is my message</b></MESSAGE></SMTP>

is the string value coming from the database.

johngalt
04-04-2006, 12:21 PM
try exchanging the <'s with &lt; and the >'s with &gt;

http://www.bangboompow.com/examples/showcode.htm