XML absorbs the lessons of the HTML loose format, and the XML starts with a "good format".
Let's look at some of the HTML statements that are visible in HTML:
1.<p>sample
2.<b><i>sample</b></i>
3.<td>sample</td>
4.<font color=red>samplar</font>
In an XML document, the syntax of several of these statements is incorrect. Because:
1. All markings must have a corresponding closing tag;
2. All XML tags must be properly nested;
3. All XML tags are case-sensitive;
4. All marked attributes must be enclosed in "";
So the above statement is correctly written in XML
1.<p>sample</p>
2.<b><i>sample</i></b>
3.<td>sample</td>
4.<font color= "Red" >samplar</font>
In addition, XML tags must follow the following naming conventions:
1. The name may contain letters, numbers and other letters;
2. Name cannot begin with number or "_" (underline);
3. Names cannot begin with the letter XML (or XML or XML ...);
4. The name cannot contain spaces.
Any error in the XML document results in the same result: The Web page cannot be displayed. Browser developers have reached an agreement to implement rigorous and critical parsing of XML, and any minor errors will be reported. You can change the above myfile.xml, for example, change the <email> to <email>, and then open myfile.xml directly with IE5, you will get an error message page:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.