...

How to Preserve WhiteSpace in XML?

gzieve
01-25-2003, 04:57 PM
I have a web site where users enter text into forms which is then stored into an xml file. I will display that onto a page using xsl to style and format the xml data.

But, how do I preserve the white space?

For example...someone enters this in a <textarea> tag:

This is line 1.

This is line 2.


But it shows up like this on the html page:

This is line 1. This is line 2.

I want to maintain paragraphs and breaks, etc. Is there someone to do this without making the user enter html tags?

Thanks.

cg9com
01-26-2003, 05:11 AM
white-space: pre;
may help you.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum