Output SML with XHTML with XSLT

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
LVL 1
samblakeAsked:
Who is Participating?
 
gabesoSolution ArchitectCommented:
<xsl:for-each select="element">
  <xsl:copy-of select="content"/>
</xsl:for-each>
0
 
samblakeAuthor Commented:
Ah, excelent. Thanks a lot.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.