XML EXtensible Markup Language. Agenda Introduction to XML XML Rules XML Elements XML Attributes XML Validation XML Exercises XML Namespaces XML CDATA.

Slides:



Advertisements
Similar presentations
XML-XSL Introduction SHIJU RAJAN SHIJU RAJAN Outline Brief Overview Brief Overview What is XML? What is XML? Well Formed XML Well Formed XML Tag Name.
Advertisements

What is XML? a meta language that allows you to create and format your own document markups a method for putting structured data into a text file; these.
SPECIAL TOPIC XML. Introducing XML XML (eXtensible Markup Language) ◦A language used to create structured documents XML vs HTML ◦XML is designed to transport.
An Introduction to XML Based on the W3C XML Recommendations.
XML XML What XML is and what it means to me as a Computer Scientist By: Derek Edwards CS 376 March 10, 2003.
INF201 Fall2010 Intro. to Info. Technologies Department of Informatics University at Albany – SUNY Original Source: w3schools.com Prepared by Xiao Liang,
IS 373—Web Standards Todd Will
Sistemi basati su conoscenza XML Prof. M.T. PAZIENZA a.a
XML Introduction What is XML –XML is the eXtensible Markup Language –Became a W3C Recommendation in 1998 –Tag-based syntax, like HTML –You get to make.
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
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
Introduction to XML: Yong Choi CSU Bakersfield.
Upgrading to XHTML DECO 3001 Tutorial 1 – Part 1 Presented by Ji Soo Yoon 19 February 2004 Slides adopted from
Introducing XHTML: Module B: HTML to XHTML. Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand.
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
CREATED BY ChanoknanChinnanon PanissaraUsanachote
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
Pemrograman Berbasis WEB XML -Aurelio Rahmadian- Sumber: w3cschools.com.
Introduction to XML History of XML Advantages of XML
Introduction to XML 1. XML XML started out as a standard data exchange format for the Web Yet, it has quickly become the fundamental instrument in the.
Introduction to XML. What is XML? Extensible Markup Language XML Easier-to-use subset of SGML (Standard Generalized Markup Language) XML is a.
XHTML. Introduction to XHTML What Is XHTML? – XHTML stands for EXtensible HyperText Markup Language – XHTML is almost identical to HTML 4.01 – XHTML is.
XHTML,XML M.Abdullah Mrian. What is the XHTML Why XHTML ?
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.
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.
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.
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.
Waqas Anwar Next SlidePrevious Slide. Waqas Anwar Next SlidePrevious Slide XML XML stands for EXtensible Markup Language.
XML Documents Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Elements Attributes Comments PI Document.
WEB APPLICATION DEVELOPMENT For More visit:
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.
1 Introduction to XML XML stands for Extensible Markup Language. Because it is extensible, XML has been used to create a wide variety of different markup.
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.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
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 –
Well Formed XML The basics. A Simple XML Document Smith Alice.
ASHIMA KALRA  INTRODUCTION OF XML INTRODUCTION OF XML  XML FEATURES XML FEATURES  XML SYNTAX XML SYNTAX  XML ELEMENTS XML ELEMENTS  XML ATTRIBUTES.
Introduction to DTD A Document Type Definition (DTD) defines the legal building blocks of an XML document. It defines the document structure with a list.
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.
Introduction to XML Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
CHAPTER NINE Accessing Data Using XML. McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Introduction The eXtensible.
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.
1 Extensible Stylesheet Language (XSL) Extensible Stylesheet Language (XSL)
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.
Unit 4 Representing Web Data: XML
What is XML?.
Presentation transcript:

XML EXtensible Markup Language

Agenda Introduction to XML XML Rules XML Elements XML Attributes XML Validation XML Exercises XML Namespaces XML CDATA XML Q&A XML Quiz

Introduction to XML What is XML?  XML stands for EXtensible Markup Language  XML was designed to describe data  XML tags are not predefined. You can define your own tags  XML uses a Document Type Definition (DTD) or an XML Schema to describe the data  XML is a W3C (World Wide Web Consortium) Recommendation

Introduction to XML What is the main difference between XML and HTML?  XML was designed to describe data and to focus on what data is.  HTML was designed to display data and to focus on how data looks.  HTML is about displaying information, while XML is about describing information.

Introduction to XML Why XML is free and extensible?  XML was created to structure, store and to send information.  XML tags are not predefined. You can "invent" your own tags.  The author of HTML documents can only use tags that are defined in the HTML standard (like,, etc.).  But the author of XML documents can define his own tags and his own document structure. Note : XML is not a replacement for HTML.

Introduction to XML Sample XML document Tove Jani Reminder Don't forget me this weekend!

Introduction to XML XML is going to be everywhere. What are the other technologies which are related to the XML?  XSLT - EXtensible Stylesheet Language Transformations  XSL-FO - EXtensible Stylesheet Language Formatting Objects  XPath  XQuery  XLink  XML Schema  Many more…

XML Rules What are the XML rules?  All XML Elements Must Have a Closing Tag  XML Tags are Case Sensitive  XML Elements Must be Properly Nested  XML Documents Must Have a Root Element  XML Attribute Values Must be Quoted  With XML, White Space is Preserved  Comments in XML

XML Rules All XML Elements Must Have a Closing Tag Do not have a closing tag - Incorrect This is a paragraph This is another paragraph Correct This is a paragraph This is another paragraph XML Tags are Case Sensitive Incorrect This is incorrect Correct This is correct

XML Rules XML Elements Must be Properly Nested Incorrect This text is bold and italic Correct This text is bold and italic XML Documents Must Have a Root Element Correct.....

XML Rules XML Attribute Values Must be Quoted Incorrect Tove Jani Correct Tove Jani

XML Rules With XML, White Space is Preserved  With XML, the white space in your document is not truncated. Comments in XML  The syntax for writing comments in XML is similar to that of HTML. 

XML Elements XML Elements are Extensible  XML documents can be extended to carry more information.  XML documents are Extensible. XML Elements have Relationships  Elements are related as parents and children. My First XML Introduction to XML Wat is HTML What is XML

XML Elements Elements have Content  Elements can have different content types.  An element can have, element content mixed content simple content or empty content Attributes Element Naming  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

XML Attributes Attributes are used to provide additional information about elements. Attribute values must always be enclosed in quotes, but either single or double quotes can be used. or or

XML Validation XML with correct syntax is Well Formed XML.  XML documents must have a root element  XML elements must have a closing tag  XML tags are case sensitive  XML elements must be properly nested  XML attribute values must always be quoted XML validated against a DTD or a XML schema is Valid XML.  A "Valid" XML document is a "Well Formed" XML document,

XML Exercises BIT Subjects Year 1Year 2Year 3 Information Systems & Technology Object Oriented Systems Development Professional Issues in IT Computer Systems IMathematics for Computing-IISecurity of Information Systems Application PackagesOperational ResearchFinal Year Project Internet & World Wide WebBusiness ManagementIntelligent Systems Mathematics for Computing I Web Development TechniquesInternet Application Development Programming IData Communications & Networks Image Processing & Computer Vision Database Systems ISoftware Project ManagementSystems & Network Administration Systems Analysis & DesignRapid Application DevelopmentAdvanced Database Management Systems  Convert above table into XML document.

XML Exercises Check the Well-Formedness of following elements  The first list An item  An item Another item  Bathing a cat is a relatively easy task as long as the cat is willing.  How to Bathe a Cat Merlin Bauer

XML Exercises Create a well-formed XML document using following elements This procedure tells you how to bathe a cat. Cats don't like to take baths. You could get hurt doing this. Be sure to obtain all the required protective gear before you start. Hockey Mask Padded Full-body Kevlar Armor Tub full of warm water Towels First Aid kit Cat Shampoo Locate the cat, who by now is hiding under the bed. Place the cat in the tub of water. Using the First Aid kit, repair the damage to your head and arms. Place the cat back in the tub and hold it down. Wash it really fast, then make an effort to dry it with the towels. Decide not to do this again.

XML Namespaces XML Namespaces provide a method to avoid element name conflicts. Name Conflicts <!-- This table element carries information in a table  Apples Bananas <!-- This table element carries information about a table  African Coffee Table

XML Namespaces XML Namespaces provide a method to avoid element name conflicts. Name Conflicts <!-- This table element carries information in a table  Apples Bananas <!-- This table element carries information about a table  African Coffee Table

XML Namespaces Solving Name Conflicts Using a Prefix No name conflict, use a different name for their element ( and ). <!-- This table element carries information in a table  Apples Bananas <!-- This table element carries information about a table  African Coffee Table

XML Namespaces Using Namespaces Instead of using only prefixes, we have added an xmlns attribute to the tag to give the prefix a qualified name associated with a namespace. <!-- This table element carries information in a table  Apples Bananas <!-- This table element carries information about a table  African Coffee Table

XML Namespaces The XML namespace attribute is placed in the start tag of an element The only purpose is to give the namespace a unique name. xmlns:namespace-prefix="namespaceURI"

XML CDATA All text in an XML document will be parsed by the parser. Only text inside a CDATA section will be ignored by the parser. if salary <!– Working properly  if salary < 1000 then Illegal XML characters have to be replaced by entity references. There are 5 predefined entity references in XML

XML CDATA Note: Only the characters "<" and "&" are strictly illegal in XML. Apostrophes, quotation marks and greater than signs are legal, but it is a good habit to replace them. <<less than >>greater than &&ampersand &apos;'apostrophe ""quotation mark

XML CDATA CDATA  Everything inside a CDATA section is ignored by the parser. <![CDATA[ function matchwo(a,b) { if (a < b && a < 0) then { return 1 } else { return 0 } ]]>

XML Q&A

XML Quiz 1. What does XML stand for? X-Markup Language eXtensible Markup Language Example Markup Language eXtra Modern Link 2. There is a way of describing XML data, how? XML uses a DTD to describe the data XML uses XSL to describe data XML uses a description node to describe data 3. XML's goal is to replace HTML True False 4. What is the correct syntax of the declaration which defines the XML version?

XML Quiz 5. What does DTD stand for? Document Type Definition Direct Type Definition Do The Dance Dynamic Type Definition 6. Is this a "well formed" XML document? Tove Jani Reminder Don't forget me this weekend! No Yes

XML Quiz 7. Which statement is true? All XML documents must have a DTD All XML elements must be lower case All the statements are true All XML elements must be properly closed 8. Is this a "well formed" XML document? Tove Jani Reminder Don't forget me this weekend! Yes No 9. Which statement is true? XML documents must have a root tag XML elements must be properly nested XML tags are case sensitive All the statements are true

XML Quiz 10. XML preserves white spaces False True 11. Is this a "well formed" XML document? Tove Jani No Yes 12.XML elements cannot be empty False True

XML Quiz 13. Is this a "well formed" XML document? Tove Jani No Yes 14. Which is not a correct name for an XML element? All 3 names are incorrect

XML Quiz 15. Which is not a correct name for an XML element? All 3 names are incorrect 16. Which is not a correct name for an XML element? All 3 names are incorrect 17. XML attribute values must always be enclosed in quotes True False

XML Quiz 18. What does XSL stand for? eXtensible Style Listing eXtensible Stylesheet Language eXtra Style Language eXpandable Style Language 19. For the XML parser to ignore a certain section of your XML document, which syntax is correct? Text to be ignored Text to be ignored 20.Which is not a correct name for an XML element?