tags:

views:

337

answers:

1

I am storing user inputs through a form with wiki style formatting (text for bold, _text for underline, etc) in my database. I was planning to use the db functions & some page code to store all of the info out to XML with the proper html formatting for each rich text field included. From there the XML gets parsed with an XSL stylesheet. The one thing I haven't been able to figure out is how to get the HTML to appear as HTML. I can get it to show the code on screen but not the formatted html.

Does any one know of a way to A) get the html in the xml file and have it appear on screen as formatted html or B) how to find/replace my wiki formatting with html with the XSL

+1  A: 

So, if I understand you correctly, you have some xml with html formatting in it, something like this:

<foo><strong>blah <a href="/">bar</a></strong></foo>

The xsl to display the html inside foo is:

<xsl:template match="foo">
    <xsl:copy-of select="."/>
</xsl:template>
Buddy
thank you this is exactly what i needed. When I was writing out the XML I used value-of instead of copy-of. Thank you So much for the help!
Kristen Zirkler