<br> output in XML

Posted on 2005-02-27
Medium Priority
Last Modified: 2013-11-19
Hi all ,

Now I use one xls format to output all my error messages recorded in xml files respectively , but what frustrate me is the content cannot wrap to another row !!! please see the xml code below :

<?xml version="1.0" encoding="GB2312"?>
<?xml:stylesheet type="text/xsl" href="error.xsl"?>
First row

1. first condiction
2. seconde condiction
3. third condiction

foot row


but the output is not come out as I expect , they will concatenate together without wrap in rows
how can I set this content to show as I want ?

Question by:Sam80
LVL 12

Expert Comment

ID: 13413634
All whitespace is automatically removed. You could go in the xsl:

Assisted Solution

Ornithoteuthis earned 80 total points
ID: 13413843
Have you tried using <xsl:preserve-space>? The 'elements' attribute of this tag lists the elements within which white space should be preserved. The tag must be a child of <xsl:stylesheet>

For the sample document above, for example, it might look like this:

  <xsl:preserve-space  elements="content"/>

Accepted Solution

Anastasiosyal earned 120 total points
ID: 13413864
Maybe you could use:

<xsl:preserve-space elements="content" />
in your xsl file under the <xsl:stylesheet element />

if you are trying to render the output in seperate lines to view in the browser you might also have something like this in your xsl:

<pre><xsl:value-of select="//content" /></pre>

Good luck,
Hope this helps


Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

593 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question