Upload
agoun-juba
View
54
Download
2
Tags:
Embed Size (px)
Citation preview
Summary I. Definition
II. Authors
III. History
IV. XML Usage
V. XML Syntax
VI. XML Element
VII.XML Attribute
VIII.Example
IX. Conclusion 2
DefinitioneXtensible Markup Language = XML
Markup language that defines a set of rules for
encoding documents in a format which
is both human-readable and
machine-readable
3
Additional information
• Filename extension .xml
• Developed by world wide web consortium
• Open format
• Started in 1996
4
Authors• Tim Bray# Canadian software developer
# Co-founded Open Text Corporation and Antarctica Systems
• C. M. Sperberg-McQueen#Instrumental in the Text Encoding Initiative (TEI)
• Jon Bosak#worked for Sun Microsystems
5
History
6
• XML is a descendant of SGML(the Standard Generalized Markup Language)
• Invented at IBM in the 1970s.
• SGML's biggest success was HTML(HyperText Markup Language) in 1993.
History
7
• Then comes XML in 1996.
• Extended to XHTML(Extensible Hypertext Markup Language) in 2000.
• Several Internet languages are written in XML:
SVG,WSDL,RSS
XML Usages
10
• Separates Data from HTML“If you need to display dynamic data in your HTML document, it will take a lot of work to edit the
HTML each time the data changes”
• Simplifies Data Sharing
• Simplifies Platform Changes
• Makes Your Data More Available“With XML, your data can be available to all kinds of -reading machines-”
XML Syntax
11
•<message> opening tag,</message> closing tag In XML, it is illegal to omit the closing tag. All elements must have a closing tag
•Elements Must be Properly NestedExample: <b><i>This text is bold and italic</i></b>
•Use <!-- This is a comment --> to comment a code
• Documents Must Have a Root ElementExample: <root> <child> <subchild>.....</subchild> </child>
</root>
XML Element
12
What is an XML Element?
An XML element is everything from (including) the element's start tag to (including) the element's end tag it contains:
other elementstextAttributesEmpty XML Elementsor a mix of all of the above...
<bookstore> <book category="CHILDREN"> <title>Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book></bookstore>
XML Attribute
13
Attributes provide additional information about an element.
Example : <file type="gif">computer.gif</file>
AttributeAttribute
Attributes Must be Quoted
Example
14
XML code:
Output :
<note> <to>Tove</to> <from>Jani</from> <body>Don't forget me this weekend!</body></note>
Conclusion
When you write an XML document:
Use an XML editor that supports encodingMake sure you know what encoding the editor usesDescribe the encoding in the encoding attributeUTF-8 is the safest encoding to useUTF-8 is the web standard
15
Bibliography
• http://www.w3schools.com/xml
• http://en.wikipedia.org/wiki/XML
• http://docstore.mik.ua/orelly/xml/xmlnut/ch01_04.htm
• http://scenari-platform.org/mobile-source/opale-demo/co/xml_web/co/xmlUL08sgml.html
• http://www.xul.fr/xml.html
• http://www.itwriting.com/xmlintro.php
16