Output the CDATA comment in the XML document as HTML text using XSL
To use DOM to access XML files, you must link the XML file to an HTML webpage.
Sample code
1. test. xml
entry with images
August 09, 2003
Kevin
000033
http://alazanto.org/xml/archives/000033.xml</permalink>
http://alazanto.org/xml/archives/000033_comments.xml</comment-link>
6
2. test. xsl
The key is to add disable-output-escaping = "yes" to the namespace xmlns: xsl = "www.w3.org/5o/#/transform" and output"
Sample code
1. test. xml
entry with images
August 09, 2003
Kevin
000033
http://alazanto.org/xml/archives/000033.xml</permalink>
http://alazanto.org/xml/archives/000033_comments.xml</comment-link>
6
2. test. xsl
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"
The above is the detailed content of the code instance that XSL outputs the CDATA annotation in XML into HTML text. For more information, see other related articles in the first PHP community!