XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old March 28th, 2008, 02:02 PM
advine advine is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 11 advine User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 11 m 42 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old March 30th, 2008, 06:17 AM
atlantisstorm atlantisstorm is offline
Hang your freedom higher.
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2005
Posts: 600 atlantisstorm User rank is First Lieutenant (10000 - 20000 Reputation Level)atlantisstorm User rank is First Lieutenant (10000 - 20000 Reputation Level)atlantisstorm User rank is First Lieutenant (10000 - 20000 Reputation Level)atlantisstorm User rank is First Lieutenant (10000 - 20000 Reputation Level)atlantisstorm User rank is First Lieutenant (10000 - 20000 Reputation Level)atlantisstorm User rank is First Lieutenant (10000 - 20000 Reputation Level)atlantisstorm User rank is First Lieutenant (10000 - 20000 Reputation Level)atlantisstorm User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 10 h 14 m 2 sec
Reputation Power: 113
__________________
"Badges? We ain't got no badges. We don't need to badges! I don't have to show you any stinkin' badges!!"

Reply With Quote
  #3  
Old March 31st, 2008, 12:35 PM
advine advine is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 11 advine User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 11 m 42 sec
Reputation Power: 0
Wow, thanks so much for the help. I thought for a while i would have to perform substitutions

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > Creating html with xslt and xml has html code


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway