2017, Fall Pusan National University Ki-Joune Li

Slides:



Advertisements
Similar presentations
SPECIAL TOPIC XML. Introducing XML XML (eXtensible Markup Language) ◦A language used to create structured documents XML vs HTML ◦XML is designed to transport.
Advertisements

Sistemi basati su conoscenza XML Prof. M.T. PAZIENZA a.a
HTML Elements. HTML documents are defined by HTML elements.
Introduction to XML This material is based heavily on the tutorial by the same name at
ECA 228 Internet/Intranet Design I Intro to XML. ECA 228 Internet/Intranet Design I HTML markup language very loose standards browsers adjust for non-standard.
XML introduction to Ahmed I. Deeb Dr. Anwar Mousa  presenter  instructor University Of Palestine-2009.
 Introduction to XML Introduction to XML  Features of XML Features of XML  Syntax of XML Syntax of XML  Syntax rules of XML document Syntax rules.
CREATED BY ChanoknanChinnanon PanissaraUsanachote
XML: Overview MIS 181.9: Service Oriented Architecture 2 nd Semester,
Xpath Xlink Xpointer Xquery Sources:
XML eXtensible Markup Language w3c standard Why? Store and transport data Easy data exchange Create more languages WSDL (Web Service Description Language)
 XML is designed to describe data and to focus on what data is. HTML is designed to display data and to focus on how data looks.  XML is created to structure,
XML TUTORIAL Portions from w3 schools By Dr. John Abraham.
1 XML An Overview Roger Debreceny University of Hawai`i Skip White University of Delaware XBRL Workshop, August 2006.
Accessing Data Using XML CHAPTER NINE Matakuliah: T0063 – Pemrograman Visual Tahun: 2009.
An Introduction to XML Sandeep Bhattaram
What it is and how it works
XML Basics A brief introduction to XML in general 1XML Basics.
CS 157B: Database Management Systems II February 11 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron.
ASHIMA KALRA  INTRODUCTION OF XML INTRODUCTION OF XML  XML FEATURES XML FEATURES  XML SYNTAX XML SYNTAX  XML ELEMENTS XML ELEMENTS  XML ATTRIBUTES.
Dave Salinas. What is XML? XML stands for eXtensible Markup Language Markup language, like HTML HTML was designed to display data, whereas XML was designed.
 XML derives its strength from a variety of supporting technologies.  Structure and data types: When using XML to exchange data among clients, partners,
CHAPTER NINE Accessing Data Using XML. McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Introduction The eXtensible.
XML – Basic Concepts (modified version from Dr. Praveen Madiraju) 2015, Fall Pusan National University Ki-Joune Li.
XML Notes taken from w3schools. What is XML? XML stands for EXtensible Markup Language. XML was designed to store and transport data. XML was designed.
Extensible Markup Language (XML) Pat Morin COMP 2405.
XML intro. What is XML? XML stands for EXtensible Markup Language XML is a markup language much like HTML XML was designed to carry data, not to display.
XML BASICS and more…. What is XML? In common:  XML is a standard, simple, self-describing way of encoding both text and data so that content can be processed.
COMP9321 Web Application Engineering Semester 1, 2017
Knowledge Representation Part IV The Semantics Web Starting with XML
Introduction to Web programming
XML University Of Benghazi IT Faculty Computer Networks and Communications Department Introduction to Internet Programming(CN281)
XML BASICS.
UNIT-V XML Introduction, Structure of XML Document, Document Type Definition, XML Namespaces, XML Schema, Working with DOM and SAX Parser, Working with.
Introduction to XML Extensible Markup Language
XML Schema.
ACG 4401 XML Schemas XML Namespaces XLink.
XML and XPath.
XML.
ACG 4401 XML Schemas XML Namespaces XLink.
XML QUESTIONS AND ANSWERS
Database Systems Week 12 by Zohaib Jan.
EXtensible Markup Language(XML)
By HITESHWAR KUMAR AZAD Ph.D Scholar
XML stands for Extensible Markup Language.
Paul Gustavson SISO XML Namespaces Paul Gustavson
The XML Language.
XML Partha Pratim.
دانشكده مهندسي كامپيوتر
Design and Implementation of Software for the Web
XML Data Introduction, Well-formed XML.
XML – Basic Concepts (modified version from Dr. Praveen Madiraju)
Introduction to Web programming
Introduction to XML.
XML Introduction By Hongming Yu Feb 6th, 2002.
Web Based Applications
Session I Chapter 1 – Writing XML
7. מבוא למסמכי XML ו-DTD (מבוסס על שקפים של אלדר פישר)
Session I Chapter 1 – Writing XML
HTML HTML is a language for describing web pages.
Javascript & jQuery XML.
XML: Introduction to XML
What is XML?.
CMP 051 XML Introduction Session IV Chapter 12 – XML Namespaces
Allyson Falkner Spokane County ISD
XML/JSON/AJAX Master a Skill / Learn for Life
CMP 051 XML Introduction Session IV Chapter 12 – XML Namespaces
XML and Security Csilla Farkas
eXtensible Markup Language XML
XML: The new standard -Eric Taylor.
Presentation transcript:

2017, Fall Pusan National University Ki-Joune Li XML 2017, Fall Pusan National University Ki-Joune Li

XML – Basic Concepts XML (eXtensible Markup Language A variation of HTML (Not only presentation but also description) A standard language for contents Designed to store and transport data Self-Descriptive using Tags (like HTML) W3C standard Syntax is very similar with HTML <?xml version="1.0" encoding="UTF-8"?> <note>   <to>Tove</to>   <from>Jani</from>   <heading>Reminder</heading>   <body>Don't forget me this weekend!</body> </note>

XML, HTML, Databases, and Java Instances System A Representing and Storing Data Display to Users via Web Browser Databases HTML document Conversion To HTML Conversion To DB XML document System B Exchange Data XML Serialization Instances from Java Class Objects from C++ Class

Nested – Tree Structure Example <?xml version="1.0" encoding="UTF-8"?> <breakfast_menu> <food>     <name>Strawberry Belgian Waffles</name>     <price>$7.95</price>     <description>     Light Belgian waffles covered with strawberries and whipped cream     </description>     <calories>900</calories> </food> <food>     <name>French Toast</name>     <price>$4.50</price>     <description>     Thick slices made from our homemade sourdough bread     </description>     <calories>600</calories> </food> </breakfast_menu> Element Nested – Tree Structure

Syntax - basics Very simple and logical XML Prolog – like HTML Header Data with Tags Must Contain one Root Element Open  Close Tag (case sensitive) May be nested No predefined tags Attribute of Elements XML Prolog – like HTML Header <note>   <date>     <year>2008</year>     <month>01</month>     <day>10</day>   </date>   <to>Tove</to>   <from>Jani</from> </note> <root>   <child>     <subchild>.....</subchild>   </child> </root> <note date="12/11/2007">   <to>Tove</to>   <from>Jani</from> </note> <?xml version="1.0" encoding="UTF-8"?>

Syntax - Elements Element: An XML element everything from (including) the element's start tag to (including) the element's end tag. Contains text attributes other elements or a mix of the above <bookstore>   <book category="children">     <title>Harry Potter</title>     <author>J K. Rowling</author>     <year>2005</year>     <price>29.99</price>   </book>   <book category="web">     <title>Learning XML</title>     <author>Erik T. Ray</author>     <year>2003</year>     <price>39.95</price>   </book> </bookstore>

One Solution: use prefix Name Conflicts Tags in XML – User-defined  may cause conflicts <table>   <tr>     <td>Apples</td>     <td>Bananas</td>   </tr> </table> <table>   <name>African Coffee Table</name>   <width>80</width>   <length>120</length> </table> XML XML (HTML) <h:table>   <h:tr>     <h:td>Apples</h:td>     <h:td>Bananas</h:td>   </h:tr> </h:table> <f:table>   <f:name>African Coffee Table</f:name>   <f:width>80</f:width>   <f:length>120</f:length> </f:table> One Solution: use prefix

Name Conflicts – Namespaces (xmlns) When using prefixes, a namespace for the prefix must be defined. The namespace can be defined by an xmlns attribute in the start tag The namespace declaration has the following syntax. xmlns:prefix="URI". <root xmlns:h="http://www.w3.org/TR/html4/" xmlns:f="https://www.w3schools.com/furniture"> <h:table>   <h:tr>     <h:td>Apples</h:td>     <h:td>Bananas</h:td>   </h:tr> </h:table> <f:table>   <f:name>African Coffee Table</f:name>   <f:width>80</f:width>   <f:length>120</f:length> </f:table> </root> Another Solution: xmlns

XML Schema Definition of XML Structures that are frequently used It is a XML document Like class definition <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="note"> <xs:complexType>   <xs:sequence>     <xs:element name="to" type="xs:string"/>     <xs:element name="from" type="xs:string"/>     <xs:element name="heading" type="xs:string"/>     <xs:element name="body" type="xs:string"/>   </xs:sequence> </xs:complexType> </xs:element> </xs:schema> Complex Element Type Simple Element Type Instance document <?xml version="1.0"?> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>

Xlink XLink is used to create hyperlinks in XML documents no browser support but can be converted to <a href=“…”> of HTML <?xml version="1.0" encoding="UTF-8"?> <bookstore xmlns:xlink="http://www.w3.org/1999/xlink"> <book title="Harry Potter">   <description   xlink:type="simple“ xlink:href="/images/HPotter.gif" xlink:show="new">   As his fifth year at Hogwarts School of Witchcraft and ......   </description> </book> <book title="XQuery Kick Start">   <description   xlink:type="simple“ xlink:href="/images/XQuery.gif" xlink:show="new">   XQuery Kick Start delivers a concise introduction ......   </description> </book> </bookstore>