How to use CSS to display XML examples

黄舟
Release: 2017-03-29 16:04:59
Original
1668 people have browsed it

Using CSS Style Sheets (Cascading Style Sheets), you can add additional practical information to the XML document.

-------------------------------------------------- ------------------------------------

Use CSS to display future XML documents What? Should you use CSS to display your future XML documents?

No, we don’t recommend this! But we should still experiment:

This is a small code snippet of an XML document decorated with CSS stylesheets:

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/css" href="cd_catalog.css"?>
<CATALOG>
<CD>
<TITLE>Empire Burlesque</TITLE>
<ARTIST>Bob Dylan</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Columbia</COMPANY>
<PRICE>10.90</PRICE>
<YEAR>1985</YEAR>
</CD>
<CD>
<TITLE>Hide your heart</TITLE>
<ARTIST>Bonnie Tyler</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>CBS Records</COMPANY>
<PRICE>9.90</PRICE>
<YEAR>1988</YEAR>
</CD>
.
.
.
.
</CATALOG>
Copy after login

Even if the display effect using CSS is good, we don’t think using CSS style sheets displaying XML documents is the future trend of web development. We believe that using XSL programs to format XML documents will be the future trend, and currently all major browsers support this technology.

The above is the detailed content of How to use CSS to display XML examples. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!