1 Dr Alexiei Dingli XML Technologies XML. 2 XML stands for EXtensible Markup Language XML is a markup language much like HTML XML was designed to carry.

Slides:



Advertisements
Similar presentations
Chapter 7 An Introduction to XML.
Advertisements

XML –EXtensible Markup Language –Designed to transform and store data –We will learn difference between xml and html.
XML Craig Stewart Dr. Alexandra I. Cristea
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 data XML.
Standards and Increasing Maintainability on Web- based Systems James Eaton SE4112/16/2006.
SPECIAL TOPIC XML. Introducing XML XML (eXtensible Markup Language) ◦A language used to create structured documents XML vs HTML ◦XML is designed to transport.
XML Unit 6 October 31. XML, review XML is used to markup data Used to describe information Uses tags like HTML –But all tags are user-defined –Must be.
XHTML 16-Apr-17.
INF201 Fall2010 Intro. to Info. Technologies Department of Informatics University at Albany – SUNY Original Source: w3schools.com Prepared by Xiao Liang,
CSE 190: Internet E-Commerce Lecture 17: XML, XSL.
IS 373—Web Standards Todd Will
Sistemi basati su conoscenza XML Prof. M.T. PAZIENZA a.a
DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of.
Sistemi basati su conoscenza XML Prof. M.T. PAZIENZA a.a
XML(EXtensible Markup Language). XML XML stands for EXtensible Markup Language. XML is a markup language much like HTML. XML was designed to describe.
XML Primer. 2 History: SGML vs. HTML vs. XML SGML (1960) XML(1996) HTML(1990) XHTML(2000)
Introduction to XML: Yong Choi CSU Bakersfield.
XML Introduction By Hongming Yu Feb 6 th, Index Markup Language: SGML, HTML, XML An XML example Why is XML important XML introduction XML applications.
Introduction to XML This material is based heavily on the tutorial by the same name at
Introduce of XML Xiaoling Song CS157A. What is XML? XML stands for EXtensible Markup Language XML stands for EXtensible Markup Language XML is a markup.
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.
Pemrograman Berbasis WEB XML part 2 -Aurelio Rahmadian- Sumber: w3cschools.com.
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.
What is XML? XML stands for EXtensible Markup Language
WPF chapter 15 Dr. John Abraham Professor UTPA. WPF –an introduction WPF provides a single platform capable of handling graphics, audio and video. WPF.
CREATED BY ChanoknanChinnanon PanissaraUsanachote
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
Pemrograman Berbasis WEB XML -Aurelio Rahmadian- Sumber: w3cschools.com.
XML eXtensible Markup Language w3c standard Why? Store and transport data Easy data exchange Create more languages WSDL (Web Service Description Language)
CISC 3140 (CIS 20.2) Design & Implementation of Software Application II Instructor : M. Meyer Address: Course Page:
XHTML,XML M.Abdullah Mrian. What is the XHTML Why XHTML ?
These Questions are copied from
 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.
How do I use HTML and XML to present information?.
CSC 330 E-Commerce Teacher Ahmed Mumtaz Mustehsan Ahmed Mumtaz Mustehsan GM-IT CIIT Islamabad GM-IT CIIT Islamabad CIIT Virtual Campus, CIIT COMSATS Institute.
Presentation Topic: XML and ASP Presented by Yanzhi Zhang.
XML eXtensible Markup Language. Topics  What is XML  An XML example  Why is XML important  XML introduction  XML applications  XML support CSEB.
Softsmith Infotech XML. Softsmith Infotech XML EXtensible Markup Language XML is a markup language much like HTML Designed to carry data, not to display.
CIS 275—Web App Dev I XML. 2 Introduction to XMLXML XML stands for ________________________. HTML was designed to display data. XML was designed to _________.
Windows Presentation Foundation (WPF) Chapter 16 Dr. Abraham.
Waqas Anwar Next SlidePrevious Slide. Waqas Anwar Next SlidePrevious Slide XML XML stands for EXtensible Markup Language.
WEB APPLICATION DEVELOPMENT For More visit:
Consuming eXtensible Markup Language (XML) feeds.
Introduction to XML This presentation covers introductory features of XML. What XML is and what it is not? What does it do? Put different related technologies.
XML EXtensible Markup Language. Agenda Introduction to XML XML Rules XML Elements XML Attributes XML Validation XML Exercises XML Namespaces XML CDATA.
1 Credits Prepared by: Rajendra P. Srivastava Ernst & Young Professor University of Kansas Sponsored by: Ernst & Young, LLP (August 2005) XBRL Module Part.
An Introduction to XML Sandeep Bhattaram
XML Introduction. What is XML? XML stands for eXtensible Markup Language XML stands for eXtensible Markup Language XML is a markup language much like.
What it is and how it works
XML Introduction. Markup Language A markup language must specify What markup is allowed What markup is required How markup is to be distinguished from.
XML Basics A brief introduction to XML in general 1XML Basics.
IS446: Internet Software Development Dr. Azeddine Chikh.
XML Presented by Kushan Athukorala. 2 Agenda XML Overview Entity References Elements vs. Atributes XML Validation DTD XML Schema Linking XML and CSS XSLT.
Web Technologies Lecture 4 XML and XHTML. XML Extensible Markup Language Set of rules for encoding a document in a format readable – By humans, and –
ASHIMA KALRA  INTRODUCTION OF XML INTRODUCTION OF XML  XML FEATURES XML FEATURES  XML SYNTAX XML SYNTAX  XML ELEMENTS XML ELEMENTS  XML ATTRIBUTES.
XML CSC1310 Fall HTML (TIM BERNERS-LEE) HyperText Markup Language  HTML (HyperText Markup Language): December  Markup  Markup is a symbol.
IS444: Modern software development tools Dr. Azeddine Chikh.
XML. HTML Before you continue you should have a basic understanding of the following: HTML HTML was designed to display data and to focus on how data.
Web Technology (NCS-504) Prepared By Mr. Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad.
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.
VCE IT Theory Slideshows by Mark Kelly study design By Mark Kelly, vceit.com, Begin.
XML Introduction to XML Extensible Markup Language.
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.
XML. 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 data.
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.
Prepared for Md. Zakir Hossain Lecturer, CSE, DUET Prepared by Miton Chandra Datta
What is XML?.
Presentation transcript:

1 Dr Alexiei Dingli XML Technologies XML

2 XML stands for EXtensible Markup Language XML is a markup language much like HTML XML was designed to carry data, not to display data XML tags are not predefined. You must define your own tags XML is designed to be self-descriptive XML is a W3C Recommendation What is XML?

3 XML –Is a meta language –Focus on transport and storage of data –Not a replacement to HTML! HTML –Is a vocabulary of SGML –Focus on display (formatting) XML vrs HTML

4 Was not designed to do anything... Just structure, store and transport information Joseph Tom Puchase tickets! XML is just pure information

5 The format of a.xml document is plain text Only XML aware applications can interpret it correctly But it can be easily viewed/edited by anyone using a simple text editor Tip: Internet Explore can be used as a viewer and validator of XML (Eg1, Eg2)Eg1Eg2 Format

6 The tags in the example above (like and ) are not defined in any XML standard. These tags are "invented" by the author of the XML document That is because the XML language has no predefined tags, it’s a meta language! The tags used in HTML (and the structure of HTML) are predefined. HTML documents can only use tags defined in the HTML standard (like,, etc.) XML allows the author to define his own tags and his own document structure Let’s be creative...

7 XML is a software and hardware independent tool for carrying information Note: the specification of the language can be found Definition

8 To display dynamic data in your HTML document, it will take a lot of work to edit the HTML each time the data changes With XML, data can be stored in separate XML files User can concentrate on using HTML for layout and display, and be sure that changes in the underlying data will not require any changes to the HTML With a few lines of JavaScript, one can read an external XML file and update the data content of the HTML. Content Vs. Layout

9 Most systems have data in incompatible formats XML is stored in plain text, thus it is software/hardware independent Much easier to share information Simple data sharing

10 As such, you can create new languages... –XHTML the latest version of HTML –WSDL for describing available web services –WAP and WML as markup languages for handheld devices –RSS languages for news feeds –RDF and OWL for describing resources and ontology –SMIL for describing multimedia for the web XML is a meta language!

11 All xml documents are in the form of a tree..... XML Tree (1)

12 XML Tree (2)

13 Simple example... Joseph Tom Puchase tickets! XML Tree (3)

14 Root element Children elements XML Tree (4)

15 XML Tree (4)

16 Create the tree for... Everyday Italian Giada De Laurentiis Harry Potter J K. Rowling U exercise

17 XML Commandments

18 For every opening Tag, there must be a closing Tag This is a paragraph Commandment 1

19 XML Tags are case sensitive This is incorrect This is correct Commandment 2

20 XML Elements Must be Properly Nested This text is bold and italic Commandment 3

21 XML Documents must have a root element..... Commandment 4

22 XML attributes must be quoted Commandment 5

23 Some characters have special meaning in XML Meet me at Tom’s place Meet me at Tom ' s place Commandment 6

24 Comments in XML Commandment 7

25 Harry Potter book is an element –which can contain other elements (such as title) Or text content (such as Harry Potter in title) category is an attribute –Whose value is CHILDREN Elements Vrs Attributes

26 Naming rules... –Names can contain letters, numbers and other characters –Names must not start with a number or punctuation character –Names must not start with the letters xml (or XML, or Xml, etc) –Names cannot contain spaces What’s in a name?

27 Make names descriptive. Names with an underscore separator are nice:,. Names should be short and simple, like this: not like this:. Avoid "-" characters. If you name something "first-name," some software may think you want to subtract name from first. Avoid "." characters. If you name something "first.name," some software may think that "name" is a property of the object "first." Avoid ":" characters. Colons are reserved to be used for something called namespaces. XML documents often have a corresponding database. A good practice is to use the naming rules of your database for the elements in the XML documents. Non-English letters like éòá are perfectly legal in XML, but watch out for problems if your software vendor doesn't support them. Best (Name) Practices

28 Generally used to provide additional information not part of the data Use quotes and for a quote within a quote, use “"” Some limitations of attributes –attributes cannot contain multiple values –attributes cannot contain tree structures –attributes are not easily expandable in future If in doubt use elements More into attributes...

29 Tove Jani Reminder Don't forget me this weekend! 10/01/2008 Tove Jani Reminder Don't forget me this weekend! Spot the difference Tove Jani Reminder Don't forget me this weekend!

30 1.XML documents must have a root element 2.XML elements must have a closing tag 3.XML tags are case sensitive 4.XML elements must be properly nested 5.XML attribute values must be quoted Well formed documents...

31 Is a "Well Formed" XML document, which also conforms to the rules of a Document Type Definition (DTD) … Valid documents...

32 A DTD is used to define the structure of an XML document but its not in XML! <!DOCTYPE note [ ]> Example DTD

33 An XSchema is an XML alternative to a DTD Example XSchema

34 Errors in XML documents will stop your XML applications XML software should be small, fast, and compatible HTML browsers will display documents with errors (like missing end tags) HTML browsers are big and incompatible because they have a lot of unnecessary code to deal with (and display) HTML errors Errors!

35 Just use a normal browser... –simple.xmlsimple.xml –cd_catalog.xmlcd_catalog.xml –plant_catalog.xmlplant_catalog.xml XML Viewing

36 Just use the Cascading Style Sheet (CSS) Without CSS With CSS Better XML Viewing

37 CATALOG { background-color: #ffffff; width: 100%; } CD { display: block; margin-bottom: 30pt; margin-left: 0; } TITLE { color: #FF0000; font-size: 20pt; } ARTIST { color: #0000FF; font-size: 20pt; } COUNTRY,PRICE,YEAR,COMPANY { display: block; color: #000000; margin-left: 20pt; } The CSS

38 Use XSLT –XSLT is the recommended style sheet language of XML –XSLT (eXtensible Stylesheet Language Transformations) is far more sophisticated than CSS –One way to use XSLT is to transform XML into HTML before it is displayed Even better XML viewing

39 The XML The XSL The result XSL Example

40 Amazon just commissioned you to create an XML file for the following book as follows: –TitleA.I. a modern approach –AuthorRussel and Norvig –PublisherPrentice Hall –Date of Publication2000 –ISBN –Dimensions10 x 5 –Number of Pages500 –Comments2 in store 1, 3 in store 2 –ReviewQuite interesting! –Imagehttp:// Exercise