When you use CSS to convert an XML document, the syntax format of the link CSS style file is as follows: syntax: 1 Introduction
When CSS is used to convert an XML document, the syntax format of the link CSS style file is as follows:
Syntax:
This statement is used to reference an external CSS file to format and output XML documents.
2. apply CSS to convert XML documents
Apply the CSS style in the instance to format and output the XML document.
Code 3
CATALOG{background-color: #ffffff;width: 100%;}CD{display: block;margin-bottom: 30pt;margin-left: 0;}TITLE{color: #FF0000;font-size: 20pt;}ARTIST{color: #0000FF;font-size: 20pt;}COUNTRY,PRICE,YEAR,COMPANY{display: block;color: #000000;margin-left: 20pt;}
2. XML code:
Empire BurlesqueBob Dylan
USA
Columbia
10.90
1985
Hide your heartBonnie Tyler
UK
CBS Records
9.90
1988
IV. running results
The above is a detailed introduction of the example of applying CSS to the XML document. For more information, see other related articles in the first PHP community!