Showing XML document with CSS
Make Simple XML file and put css link refrence at top...(as shown in red) :
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/css" href="collegexml.css"?>
<COLLEGE>
<STUDENT>
<NAME>ROHAN KANDWAL</NAME>
<BRANCH>iNFORMATION TECHNOLOGY</BRANCH>
<ROLLNO>800808122</ROLLNO>
<YEAR>2008-12</YEAR>
</STUDENT>
<STUDENT>
<NAME>SHRISTI BAGGA </NAME>
<BRANCH>ELECTRONIC COMMUNICATION</BRANCH>
<ROLLNO>800808122</ROLLNO>
<YEAR>2009-13</YEAR>
</STUDENT>
<STUDENT>
<NAME>SUNIL KUMAR</NAME>
<BRANCH>COMPUTER SCIENCE</BRANCH>
<ROLLNO>080800988</ROLLNO>
<YEAR>2012-16</YEAR>
</STUDENT>
.
Make Simple XML file and put css link refrence at top...(as shown in red) :
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/css" href="collegexml.css"?>
<COLLEGE>
<STUDENT>
<NAME>ROHAN KANDWAL</NAME>
<BRANCH>iNFORMATION TECHNOLOGY</BRANCH>
<ROLLNO>800808122</ROLLNO>
<YEAR>2008-12</YEAR>
</STUDENT>
<STUDENT>
<NAME>SHRISTI BAGGA </NAME>
<BRANCH>ELECTRONIC COMMUNICATION</BRANCH>
<ROLLNO>800808122</ROLLNO>
<YEAR>2009-13</YEAR>
</STUDENT>
<STUDENT>
<NAME>SUNIL KUMAR</NAME>
<BRANCH>COMPUTER SCIENCE</BRANCH>
<ROLLNO>080800988</ROLLNO>
<YEAR>2012-16</YEAR>
</STUDENT>
.
.
.
</COLLEGE>
.
</COLLEGE>
Now your css file "collegexml.css":
COLLEGE { background-color: #66aacc; width: 100%; } STUDENT { display: block; margin-bottom: 50px; margin-left: 13px; } NAME { color: #FF0060; font-size:18pt; } BRANCH { color: #0070FF; font-size: 16pt; } ROLLNO,YEAR { display: block; color: #0865c0; margin-left: 16pt; }