XML 215 Presentation
XML 215 Presentation
Outline of Presentation
• Introduction
• Comparison between XML and HTML
• XML Syntax
• XML Queries and Mediators
• Challenges
• Summary
What is XML?
Purpose To display data and format web pages To store and transport data
Structure Focuses on appearance and layout Focuses on data structure and meaning
Error Handling Lenient – browsers can fix small errors Strict – errors must be fixed to work
Data Handling Not suitable for data exchange Ideal for data exchange between systems
Customization Limited; only predefined elements Fully customizable to suit data needs
Authoring XML Elements
• An XML element is made up of a start tag, an end tag, and
data in between.
• Example:
<director> Matthew Dunn </director>
• Example of another element with the same value:
<actor> Matthew Dunn </actor>
• XML tags are case-sensitive:
<CITY> <City> <city>
• XML can abbreviate empty elements, for example:
<married> </married> can be abbreviated to
<married/>
Authoring XML Elements (cont’d)
• Example:
<XML ID=“XMLID”>
<customer>
<name> Mark Hanson </name>
<custID> 29085 </custID>
</customer>
</XML>
Document Type Definitions (DTD)
Indicator Occurrence
price stock
• Security