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
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old April 27th, 2003, 06:24 PM
VSD-Anthony VSD-Anthony is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 1 VSD-Anthony User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
XHTML inside an XML node?

Hello,

I have a PHP script which automatically puts together a text message, including <br /> and various other XHTML commands, and inserts that into an XML node to be formatted using XSLT. XSLT then inserts the data when it is needed. The problem is, XML interprets these to be child nodes and therefore I lose all the line breaks, tables, and so forth in that block of text

I've looked around, but can't seem to find a workaround. Any ideas?

Reply With Quote
  #2  
Old April 28th, 2003, 08:24 AM
DarrenJ DarrenJ is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 42 DarrenJ User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 21 sec
Reputation Power: 6
You need to put such code inside an CDATA sectionen.

For example
Code:
<yournode>
<![CDATA[<strong>Some text</strong><br/><br/>
little more text]]>
</yournode>
__________________
Best regards
Darren

Reply With Quote
  #3  
Old May 5th, 2003, 02:45 PM
thinkninja thinkninja is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 12 thinkninja User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
or you can use <xsl:copy-of select="yournode" /> to, er, copy the child nodes but the xhtml would have to be well-formed.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > XHTML inside an XML node?


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


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





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