A, XML foundation
The main purpose of XML (I think on these three points):
Separating the XML data from HTML
XML data sharing simplified
XML simplified data transfer
XML syntax rules:
- XML documents must have a root element
- XML document must have a closing tag
- XML tags are case sensitive
- XML elements must be properly nested
- XML attribute must be quoted, for example: <note date = "08/08/2008">
- XML comments: <- This is a comment -!>
E.g:
<? xml version = "1.0" encoding = "ISO-8859-1"?> // defines the XML version (1.0) and the encoding used (ISO-8859-1 = Latin-1 / Western European character sets).
<? xml-stylesheet type = " text / css" href = "cd_catalog.css"?> // references css file
<? xml-stylesheet type = " text / xsl" href = "simple.xsl"?> // use XLST
<note> // root element note
<to> George </ to> // child element to
<from> John </ from> // sub-elements from
<heading> Reminder </ heading>
<body> the Do not forget Meeting The! </ body>
</ Note>
In XML, five predefined entity references:
< | < | Less than |
> | > | more than the |
& | & | And number |
' | ' | apostrophe |
" | " | quotation marks |
Second, senior