Presentation is loading. Please wait.

Presentation is loading. Please wait.

Extensible Markup Language Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.

Similar presentations


Presentation on theme: "Extensible Markup Language Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University."— Presentation transcript:

1 Extensible Markup Language Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University

2 Outline Overview. Basic XML Syntax. User-Defined XML Structure  Document Type Definition.

3 Overview What is Markup Language ?  Old style communication for editing.  Between writer and editor.  Example: This are is a mark-up. We can more text. add Sometimes, called “Metalanguage” ^

4 Overview Family of Computer Markup Language  Standard Generalized Markup Language (SGML) Father of them all. Complex.  HyperText Markup Language (HTML) The most popular child. Focus on presentation: for human.

5 Overview  Extensible Markup Language (XML) Become increasingly popular. Similar to HTML. Focus on describing data  For human and machine. Extensible  Language for creating other languages.  Base syntax.  User-defined structure.

6 Example Tiger pantera tigris poachers habitat destruction trade in tiger bones for traditional Chinese medicine(TCM) 500 pounds 3 yards from nose to tail...

7 XML Siblings XML Structure Definition  Document Type Definition (DTD).  XML Schema. XML Parser  DOM.  SAX. XML-related technologies  XSLT.  XPath.

8 XML Components Element: tag and content  Data. Tiger

9 XML Components Attribute: name and value  Metadata = Data of Data. Tiger English Tiger

10 XML Components Nested element Tiger Panthera tigris 500 pounds

11 XML Components Empty element

12 XML Components Special symbols  & for ampersand (&).  < for less than sign (<).  > for greater than sign (>).  " for double quotation (“).  &apos; for single quotation or apostrophe (‘). <500 pounds

13 XML Components Comment

14 Basic XML Syntax All XML files/applications must conform to basic XML syntax  XML declaration is not required (but recommended). Tiger

15 Basic XML Syntax  One and only one root element. Tiger

16 Basic XML Syntax  Balanced and matched opening/closing tags. Tiger

17 Basic XML Syntax  Case-sensitive. Tiger  Case-sensitive.

18 User-Defined XML Structure XML basic syntax  The pattern of all XML documents.  Does not say about “structure”.  Followed basic syntax = well-formed document. User-Defined XML Structure  Which “tags” and “attributes” are allowed.  Describe the structure.  Followed “structure” = valid document.

19 Parser and DTD XML Parser XML Document Yes/No DTD Check input using basic syntax and DTD.

20 Document Type Definition (DTD) Old-fashioned, simple, but widely used. Internal DTD. <!DOCTYPE endangered_species [... ]>...

21 Document Type Definition (DTD) External DTD. <!DOCTYPE endangered_species SYSTEM “http://www.natawut.com/xml/my_xml.dtd”>...

22 Defining Elements

23 Defining Elements Tiger 500 pounds...

24 Defining Elements Tiger poachers 500 pounds...

25 Defining Elements 500 pounds 3 yards from nose to tail

26 Defining Elements

27 Defining Attributes 445

28 Defining Attributes

29 Defining Attributes

30 Putting Them Together...


Download ppt "Extensible Markup Language Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University."

Similar presentations


Ads by Google