Ios development and learning accumulation: 20161101, ios20161101
20161101
XML Declaration
1 <?XML version="1.0" encoding="UTF-8" ?>
XML documents must have root elements
XML is case sensitive
All XML elements must have close labels
The XML document must be enclosed in quotation marks.
In XML, some characters have special meanings and must be referenced by entities.
In XML, there are 5 predefined entity references:
& Lt; <less
& Gt;> greater
& Amp; & and number
& Apos; 'single quotes
& Quot; "quotation marks
XML Annotation
<!— This is a comment —>
The content in XML is retained.
Use elements to describe data as much as possible, and only use attributes to provide information unrelated to Data.
Metadata should be stored as attributes (data), and data itself should be stored as elements.
XML Verification
Http://www.w3school.com.cn/xml/xml_validator.asp
Google Chrome cannot prompt errors. Firefox can prompt errors.
XML Javascript
Syntax for creating an XMLHttpRequest object
1 xmlhttp = new XMLHttpRequest();
Earlier versions of internetExplorer (IE5 and IE6) Use ActiveX objects
1 xmlhttp = new ActiveXObject(“Microsoft.XMLHTTP”);
Instance
TEST.html
1 <!DOCTYPE html> 2 View Code
Note. xml
1 <?xml version="1.0" encoding="UTF-8"?>2 <note>3 <to>George</to>4 <from>John</from>5 View Code