1. Example
1 <?XML version= "1.0" encoding= "Utf-8"?>2 3 <!--referencing CSS style files -4 <?xml-stylesheet type= "text/css" href= "Css.css "?>5 <class>6 <Stu>7 <name>Jimmy</name>8 <Sex>Mans</Sex>9 < Age>19</ Age>Ten </Stu> One A <Stu> - <name>Tommy</name> - <Sex>Women</Sex> the < Age>20</ Age> - </Stu> - - <Stu> + <name>Ketty</name> - <Sex>Women</Sex> + < Age>21st</ Age> A </Stu> at </class>
2. Syntax
2.1 <?xml version= "1.0" encoding= "Utf-8"?>
2.2 There is only one root node in the entire document and must be closed
2.3 XML attribute must have value < element Name Property name = attribute value > literal content </element name >
2.4 XML introduced in CSS file format <?xml-stylesheet type= "Text/css" href= "Css.css"?>
Edit the tag directly in the CSS file
class {background-color:red;} Stu {background-color:Green} name {font-size:20px;}
View Code
xml--notes