Welcome to WebmasterWorld Guest from 54.226.27.104

Forum Moderators: httpwebwitch

Message Too Old, No Replies

How do I keep linebreaks?

     

roxpace

12:49 am on Mar 29, 2006 (gmt 0)

10+ Year Member



Does anyone know how as easy as possible to keep the linebreaks in a raw text, I have manually added text into a XML file with linebreaks, but all shows up as one huge text with no linebreaks.

Also to mention that, I am using PHP 4 to manage XML.

choster

3:01 pm on Mar 29, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Make sure your <xsl:output method="xml"> and try putting xml:space="preserve" on the root element of your source XML, e.g.

<mydoc xml:space="preserve">
...
</mydoc>

roxpace

3:16 pm on Mar 29, 2006 (gmt 0)

10+ Year Member



Do i put these lines in a seperate file? I havent used XSL with my XML file and not sure how it works in PHP.

choster

3:32 pm on Mar 29, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sorry, outside my range. Maybe try the PHP forum?

macrost

7:46 pm on Mar 30, 2006 (gmt 0)

10+ Year Member



roxpace,
I just posted in another thread about an article that I found that shows how to use XML/XSL transformations in PHP.

[webmasterworld.com ]

roxpace

1:15 am on Apr 1, 2006 (gmt 0)

10+ Year Member



Thanks for that, but didnt found a clear answer there.

What I know that should be possible to do with a XSLT. But how?

 

Featured Threads

Hot Threads This Week

Hot Threads This Month