Presentation is loading. Please wait.

Presentation is loading. Please wait.

By Mohsen ashouri.  Introduction  Comparison between XML and HTML  XML Syntax  Challenges  Summary.

Similar presentations


Presentation on theme: "By Mohsen ashouri.  Introduction  Comparison between XML and HTML  XML Syntax  Challenges  Summary."— Presentation transcript:

1 By Mohsen ashouri

2  Introduction  Comparison between XML and HTML  XML Syntax  Challenges  Summary

3  e X tensible M arkup L anguage  Based on Standard Generalized Markup Language (SGML)  Version 1.0 introduced by World Wide Web Consortium (W3C) in 1998  Bridge for data exchange on the Web

4  Extensible set of tags  Content orientated  errors are not allowed  Allows multiple output forms  Fixed set of tags  Presentation oriented  Ignore many HTML errors  Single presentation XML HTML

5  An XML element is made up of a start tag, an end tag, and data in between.  Example: Majid Majidi  Example of another element with the same value: Parviz Parastooi  XML tags are case-sensitive:  XML can abbreviate empty elements, for example: can be abbreviated to

6  An attribute is a name-value pair separated by an equal sign (=).  Example: Isfahan  Attributes are used to attach additional, secondary information to an element.

7  A basic XML document is an XML element that can, but might not, include nested XML elements.  Example: Second Chance Matthew Dunn

8 Hull California 1995 Su Venezuela Hull Purdue BOOKS 123555 California Su titleauthor title author article book year 1995 ref loc=“library”

9  Authoring guidelines: › All elements must have an end tag. › Elements must be properly nested, e.g. not book and title › All attribute values must be enclosed in quotation marks. › Each document must have a unique first element, the root node.

10  Comments can be put anywhere in an XML document  Comments are not elements and do not have an end tag  The blanks after are optional  The closing bracket must be -->  Comments are not displayed by browsers, but can be seen by anyone who looks at the source code  Example :

11  An XML document may have an optional DTD.  DTD serves as grammar for the underlying XML document, and it is part of XML language.  DTDs are somewhat unsatisfactory, but no consensus exists so far beyond the basic DTDs.  DTD has the form: <!DOCTYPE root [markupdeclaration]>

12  Consider an XML document: Ali 42 ali@gmail.com ……… ………. db Person 42 age nameemail ali@gmail.com Person … ali

13  DTD for it might be: <!DOCTYPE db [ ]>

14  If the elements within your document must appear in a distinct order, you should define your content model using a sequence.  To achieve this, simply list the element names separated by commas.  Example: ›

15  Example: › › This declaration mandates that we would allow our element to contain one or one or one or one › If element were empty, or if it contained more than one of these the parser would raise an error.

16 Occurrence Indicator: IndicatorOccurrence (no indicator)RequiredOne and only one ?OptionalNone or one *Optional, repeatable None, one, or more +Required, repeatable One or more

17  Learn XML – Persian L anguage  Security


Download ppt "By Mohsen ashouri.  Introduction  Comparison between XML and HTML  XML Syntax  Challenges  Summary."

Similar presentations


Ads by Google