?
Solved

Output SML with XHTML with XSLT

Posted on 2006-04-10
2
Medium Priority
?
294 Views
Last Modified: 2010-04-17
Hi, I have XML similar to:

<root>
   ...
  <element>
    <content>This is <b>an</b> element<content>
  </element>
  <element>
    <content>This is <br />another element<content>
  </element>
   ...
</root>

I want to print out each on with XSLT. I would think I could do it with something like:

...
<xsl:for-each select="element">
  <xsl:value-of select="content"/>
</xsl:for-each>
...

However this just outputs:

This is an element
This is another element

No style or line break. Does anyone know how to output the XHTML aswell. Thanks.

-Sam
0
Comment
Question by:samblake
2 Comments
 
LVL 9

Accepted Solution

by:
gabeso earned 300 total points
ID: 16421012
<xsl:for-each select="element">
  <xsl:copy-of select="content"/>
</xsl:for-each>
0
 
LVL 1

Author Comment

by:samblake
ID: 16421707
Ah, excelent. Thanks a lot.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

850 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