|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Creating html with xslt and xml has html code
Using C# to do xslt and having problems with an xml node that has html in it.
Example of the xml file: <EmailNotificationData> <Entrys> <Entry> <Keys> <Key title="Permit #">B08-00463S</Key> <Key title="Sent To" >John Smith</Key> <Key title="Email Address" >John.s@test.com</Key> <Key title="Status" >Acknowledged</Key> <Key title="Description" >Septic Verified / Completed</Key> <Key title="Date Sent" >2008-03-17</Key> </Keys> <EmailContent> <![CDATA[ <div style="border-width: 1px; width: 702px;"> <div style="width: 100%; padding-bottom: 10px; overflow: hidden;"> <div style="float: left;"> <img src="Logo.gif" alt="" /> </div> </div> <div style="width: 100%; padding-top: 10px;"> <p>Date: 3/17/2008</p> <p> Dear John Smith</p> <p> <span>Please note the following update on Permit Number B08-00291K</span> </p> <p> <span style=" font-weight: bold; font-size: smaller;">*** AUTOMATED MESSAGE - PLEASE DO NOT REPLY AS YOU WILL NOT RECEIVE A REPLY ***</span> </p> </div> </div> ]]> </EmailContent> </Entry> ... ... All the other nodes except <EmailContent> work fine. I wrapped the element <EmailContent> with CDATA hoping it would come accross but when do an xslt conversion, all the tags get replaced with: <div style="border-width: 1px; width: 702px;"> <div style="width: 100%; padding-bottom: 10px; overflow: hidden;"> <div style="float: left;"> <img src="Logo.gif" alt="" /> </div> </div> <div style="width: 100%; padding-top: 10px;"> I read the EmailContent node with just a <xsl:value-of select="EmailContent"/> The output is html so as you can see it doesnt display properly. If anyone can help me figure out what the best way to properly convert the html in the xml file when doing the xsl transformation would be much appreciated. Thanks ![]() |
|
#2
|
|||
|
|||
|
These should point you in the right direction...
http://biglist.com/lists/lists.mulb...8/msg00144.html http://xml.silmaril.ie/authors/html/ http://evolt.org/node/27855
__________________
"Badges? We ain't got no badges. We don't need to badges! I don't have to show you any stinkin' badges!!" |
|
#3
|
|||
|
|||
|
Wow, thanks so much for the help. I thought for a while i would have to perform substitutions
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Creating html with xslt and xml has html code |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|