Example Code
1. Test. xml
Copy code The Code is as follows: <? XML version = "1.0" encoding = "gb2312"?>
<? XML-stylesheet href = "test. XSL" type = "text/XSL"?>
<Entry>
<Title> entry with images </title>
<Date> August 09,200 3 </date>
<Author> Kevin </author>
<Idnum> 000033 </idnum>
<Permalink> http://alazanto.org/xml/archives/000033.xml </permalink>
<Body xmlns: html = "http://www.w3.org/1999/xhtml"> <! [CDATA [<p> Class = "ARCHIVE" align = "right" src = "http://alazanto.org/images/sample.jpg"
Alt = "photograph of a flower, just for show"/> mauris Felis elit, varius
Quis, pulvinar Vel, sodales vehicula, mi. nunc elementum pharetra elit.
</P>]>
</Body>
<More xmlns: html = "http://www.w3.org/1999/xhtml"> <! [CDATA []> </more>
<Comment-link> http://alazanto.org/xml/archives/000033_comments.xml </comment-link>
<Comment-count> 6 </comment-count>
</Entry>
2. Test. XSLCopy codeThe Code is as follows: <? XML version = "1.0"?>
<XSL: stylesheet xmlns: XSL = "http://www.w3.org/1999/XSL/Transform" version = "1.0">
<XSL: template match = "/entry">
<HTML>
<Head>
</Head>
<Body>
<XSL: value-of select = "title"/>
<XSL: value-of select = "body" Disable-output-escaping = "yes"/>
</Body>
</Html>
</XSL: Template>
</XSL: stylesheet>
The key is to use the namespace xmlns: XSL = "http://www.w3.org/1999/XSL/Transform" and add disable-output-escaping = "yes" to the output"