XML TUTORIAL Portions from w3 schools By Dr. John Abraham.

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

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 XML What XML is and what it means to me as a Computer Scientist By: Derek Edwards CS 376 March 10, 2003.
1 CP3024 Lecture 9 XML revisited, XSL, XSLT, XPath, XSL Formatting Objects.
3 November 2008CIS 340 # 1 Topics To define XML as a technology To place XML in the context of system architectures.
INF201 Fall2010 Intro. to Info. Technologies Department of Informatics University at Albany – SUNY Original Source: w3schools.com Prepared by Xiao Liang,
CS 898N – Advanced World Wide Web Technologies Lecture 21: XML Chin-Chih Chang
IS 373—Web Standards Todd Will
Computer Information Systems Information Systems California State University Los Angeles Jongwook Woo CIS 561 Design of an E-Commerce Site XML Validation.
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
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.
Julien Thibault  HTML is the basic building-blocks of webpages  It is not a language!! (despite its name)  Structure text/media.
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.
Introduction to XML cs3505. References –I got most of this presentation from this site –O’reilly tutorials.
WPF chapter 15 Dr. John Abraham Professor UTPA. WPF –an introduction WPF provides a single platform capable of handling graphics, audio and video. WPF.
E X TENSIBLE M ARKUP L ANGUAGE (XML). What is XML?  XML stands for EXtensible Markup Language  XML is mainly designed to carry (or transmit) data, not.
CREATED BY ChanoknanChinnanon PanissaraUsanachote
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
XML eXtensible Markup Language w3c standard Why? Store and transport data Easy data exchange Create more languages WSDL (Web Service Description Language)
1 © Netskills Quality Internet Training, University of Newcastle Introducing XML © Netskills, Quality Internet Training University.
Introduction to XML. What is XML? Extensible Markup Language XML Easier-to-use subset of SGML (Standard Generalized Markup Language) XML is a.
XML 1 Enterprise Applications CE00465-M XML. 2 Enterprise Applications CE00465-M XML Overview Extensible Mark-up Language (XML) is a meta-language that.
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,
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.
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.
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 Instructor: Charles Moen CSCI/CINF XML  Extensible Markup Language  A set of rules that allow you to create your own markup language  Designed.
XP 1 Creating an XML Document Developing an XML Document for the Jazz Warehouse XML Tutorial.
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.
1 Tutorial 11 Creating an XML Document Developing a Document for a Cooking Web Site.
CHAPTER 15 WPF Windows Presentation Foundation Dr. John Abraham Professor, UTPA.
XML Presented by Kushan Athukorala. 2 Agenda XML Overview Entity References Elements vs. Atributes XML Validation DTD XML Schema Linking XML and CSS XSLT.
CIS 375—Web App Dev II XSD. 2 XSD IntroductionIntroduction XSD stands for XML __________ Definition, which is the XML-based alternative to ______. An.
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 –
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 DTD. XML Validation XML with correct syntax is "Well Formed" XML. XML validated against a DTD is "Valid" XML.
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.
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 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.
Prepared for Md. Zakir Hossain Lecturer, CSE, DUET Prepared by Miton Chandra Datta
دانشكده مهندسي كامپيوتر
Presentation transcript:

XML TUTORIAL Portions from w3 schools By Dr. John Abraham

What is XML? XML stands for EXtensible Markup Language XML is a markup language much like HTML XML was designed to describe data XML tags are not predefined. You must define your own tags

Tags for XML John Doe Each element has meaning assigned such as firstName instead of just raw data.

XML Basics XML uses a Document Type Definition (DTD) or an XML Schema to describe the data XML with a DTD or XML Schema is designed to be self-descriptive XML is a W3C Recommendation

XML Portable, Widely supported, Open technology Standard for storing data (as text file) that are exchanged between applications. Not for displaying data No predefined tags – user supplies tags. With XML, financial information can be exchanged over the Internet

XML vs. 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 XML can separate data from HTML

ARTICLE.XML file Simple XML December 6, 2001 John Doe XML is pretty easy. In this chapter, we present a wide variety of examples that use XML.

EXPLANATION Root element is article Child elements are title, data, author & summary To process this file, an XML parser is required, such as msxml (microsoft), Xerces (appache), etc.

XML rules All XML elements must have a closing tag –With XML, it is illegal to omit the closing tag. XML tags are case sensitive All XML elements must be properly nested. Following is wrong: – This text is bold and italic All XML documents must have a single root element

XML attributes XML elements can have attributes in the start tag, just like HTML. Attribute values must always be quoted Avoid using attributes if you can. Use child elements instead.

Processing XML Documents Requires software called and XML parser –Microsoft xml core services (MSXML) –Apache Xerces –Expat XML Parser Parser makes data available to applications Parser verifies syntax

DTD A Document Type Definition defines the legal building blocks of an XML document. It defines the document structure with a list of legal elements. A "Valid" XML document also conforms to a DTD. A "Valid" XML document is a "Well Formed" XML document, which also conforms to the rules of a Document Type Definition (DTD) A DTD can be declared inline in your XML document, or as an external reference Your application can use a standard DTD to verify that the data you receive from the outside world is valid. You can also use a DTD to verify your own data.

Internal DTD <!DOCTYPE note [ ]> Tove Jani Reminder Don't forget me this weekend

This DTD is interpreted like this: !DOCTYPE note (in line 2) defines that this is a document of the type note. !ELEMENT note (in line 3) defines the note element as having four elements: "to,from,heading,body". !ELEMENT to (in line 4) defines the to element to be of the type "#PCDATA". !ELEMENT from (in line 5) defines the from element to be of the type "#PCDATA" and so on.....

External DOCTYPE declaration If the DTD is external to your XML source file, it should be wrapped in a DOCTYPE definition with the following syntax: Tove Jani Reminder Don't forget me this weekend! And this is a copy of the file "note.dtd" containing the DTD:

XML Schema XML Schema is an XML based alternative to DTD. An XML schema describes the structure of an XML document. The XML Schema language is also referred to as XML Schema Definition (XSD). An XML Schema: –defines elements that can appear in a document –defines attributes that can appear in a document –defines which elements are child elements –defines the order of child elements –defines the number of child elements –defines whether an element is empty or can include text –defines data types for elements and attributes –defines default and fixed values for elements and attributes

A Simple XML Schema This is a simple XML Schema file called "note.xsd" that defines the elements of the XML document above ("note.xml"): <xs:schema xmlns:xs=" targetNamespace=" xmlns=" elementFormDefault="qualified">

Viewing XML files Raw XML files can be viewed in Mozilla, Firefox, Opera, Internet Explorer, and in Netscape 6+. However, to make XML documents to display like nice web pages, you will have to add some display information With CSS (Cascading Style Sheets) you can add display information to an XML document. Look at this XML file: Look at this XML file: note.xml note.xml

Displaying XML files with CSS Take a look at this XML file: The CD catalogThe CD catalog Then look at this style sheet: The CSS fileThe CSS file Finally, view: The CD catalog formatted with the CSS fileThe CD catalog formatted with the CSS file –XSL (the eXtensible Stylesheet Language) is the preferred style sheet language of XML. –View the XML file, the XSL style sheet, and View the result.View the XML filethe XSL style sheetView the result

XSLT XSLT (Extensible Stylesheet Language Tranformation) is a language for transforming XML documents into XHTML documents or to other XML documents. XSLT is the most important part of XSL XSLT transforms an XML document into another XML document XSLT uses XPath to navigate in XML documents

XML namespaces Collection of elements and attribute names. –Provide a means for document authors to unambigously refer to elements with same name. – –Use namespace prefix and a colon. –Use default namespace – then namespace colon not necessory.

Please refer to Ch 14 for additional descriptions on XML