|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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? |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
or you can use <xsl:copy-of select="yournode" /> to, er, copy the child nodes but the xhtml would have to be well-formed.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > XHTML inside an XML node? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|