Display HTML results with XSL

Source: Internet
Author: User
Test. xml

<? 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 >

Test. XSL

<? 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- Select = "Title"   />  
< XSL: value- Select = "Body" Disable-output-escaping = "Yes" />  

</ Body >  
</ Html >  
</ XSL: Template >  
</ XSL: stylesheet >


The key sentence is:
Disable-output-escaping = "yes"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.