DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of.

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

XML XML What XML is and what it means to me as a Computer Scientist By: Derek Edwards CS 376 March 10, 2003.
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
Sistemi basati su conoscenza XML Prof. M.T. PAZIENZA a.a
Sistemi basati su conoscenza XML Prof. M.T. PAZIENZA a.a
Tutorial 11 Creating XML Document
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 Rashmi Kukanur. XML XML stands for Extensible Markup Language XML was designed to carry data XML and HTML designed with different.
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
ULI101 – XHTML Basics (Part II) What is Markup Language? XHTML vs. HTML General XHTML Rules Block Level XHTML Tags XHTML Validation.
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.
CREATED BY ChanoknanChinnanon PanissaraUsanachote
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
Pemrograman Berbasis WEB XML -Aurelio Rahmadian- Sumber: w3cschools.com.
Chapter 1 Understanding the Web Design Environment Principles of Web Design, 4 th Edition.
Week 1 Understanding the Web Design Environment. 1-2 HTML: Then and Now HTML is an application of the Standard Generalized Markup Language Intended to.
1 © Netskills Quality Internet Training, University of Newcastle Introducing XML © Netskills, Quality Internet Training University.
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. Introduction to XHTML What Is XHTML? – XHTML stands for EXtensible HyperText Markup Language – XHTML is almost identical to HTML 4.01 – XHTML is.
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 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 About XML Things to be known Related Technologies XML DOC Structure Exploring XML.
Tutorial 1: XML Creating an XML Document. 2 Introducing XML XML stands for Extensible Markup Language. A markup language specifies the structure and content.
XML TUTORIAL Portions from w3 schools By Dr. John Abraham.
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.
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
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.
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.
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.
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 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.
 XML derives its strength from a variety of supporting technologies.  Structure and data types: When using XML to exchange data among clients, partners,
Introduction to XML Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
XP 1Creating Web Pages with XML Tutorial 1 New Perspectives on XML Tutorial 1 – Creating an XML Document.
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.
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.
XML Introduction By Hongming Yu Feb 6th, 2002.
What is XML?.
Presentation transcript:

DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of Architecture Wei Peng  What is XML ?  XML stands for eXtensible Markup Language which is a cross-platform, software and hardware independent tool for transmitting information  XML is a markup language much like HTML – also a subset of Standard Generalized Markup Language (SGML)  XML is for describing the data as HTML for displaying the data  Before we introduce XML, have a look at HTML  HTML (HyperText Markup Language) was introduced by Tim Berners- Lee and his colleagues in 1989 in order to manage and share large amounts of information among colleagues

DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of Architecture Wei Peng  What is HTML ?  HTML is a markup language, a structured language that lets you identify common sections of a document in terms of headings, paragraphs, etc.  An HTML file includes text and HTML markup elements that indicate how the document sections appear in a browser  Examples: XML Introduction - What is XML XML is a complement to HTML XML is not a replacement for HTML. ……  HTML mixed style information within the structure limits the cross- platform compatibility of the content

DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of Architecture Wei Peng  Cascading Style Sheets: CSS  Separating display information lets you reorient your content for multiple destinations.  Separation of style and structure was accomplished in 1996 by the W3C’s ( specification for a Web style language named Cascading Style Sheets (CSS).  CSS only sets the format and placement of elements.  Such as: Title (display: block; font-size: 16pt; font-weight: bold)

DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of Architecture Wei Peng  XML Basics:  XML was designed to describe data and focus on what data is. While HTML was designed to display data and focus on how data looks.  XML tags are not predefined – you must define your own tags – XML is thus a language that lets you describe a markup language, allowing you to create your own elements to meet your information needs.  XML is a complement to HTML, not a replacement for HTML – In future Web development it is most likely that XML will be used to describe the data, while HTML will be used to format and display the same data.  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

DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of Architecture Wei Peng  Compare XML with HTML  HTML is used for data presentation and formatting, whereas XML’s focus is on data content only.  The XML document doesn’t tell you anything about how to render the information in the browser. You have to tell the browser.  When HTML is used to display data, the data is stored inside your HTML.  XML was designed to store, carry, and exchange data. XML was not designed to display data.  XML provides real cross-platform capability which comes from separating display and style from the structure of data.

DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of Architecture Wei Peng  What is XML for ?  XML can separate data from HTML – in terms of data islands;  XML is used to exchange data – with XML, data can be exchanged between incompatible systems – relieve developers from the most time-consuming challenges;  XML and B2B – with XML, financial information can be exchanged over the Internet; XML is going to be the main language for exchanging financial information between businesses over the Internet;  XML can be used to share data because XML data is stored in plain text format, which provides a software- and hardware-independent way of sharing data;  XML can be used to store data – can be next generation database;  XML can be used to create new languages – such as WML (Wireless Markup Language) which is used to markup Internet applications for handheld devices like mobile phones.  …….

DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of Architecture Wei Peng  XML Syntax (I):  An example:  XML declaration - defines the XML version and the character encoding used in the document  this document is a note Bill  to Bill Hulk  from Hulk Reminder  to remind Bill Don't forget to patch up my windows  All XML elements must have a closing tag – unlike HTML;  XML tags are case sensitive – unlike HTML;  All XML elements must be properly nested – This text is bold and italic – not correct!!

DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of Architecture Wei Peng  XML Syntax (II):  All XML documents must have a root element and all other elements must be within this root element;  Attribute values must always be quoted – it is illegal to omit quotation marks around attribute values; -- illegal here  With XML, white space is preserved rather than truncated;  Comments in XML is similar to that of HTML.

DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of Architecture Wei Peng  XML Syntax (III):  XML elements have relationships which is related as parents and children;  Example: My First XML Introduction to XML What is HTML What is XML XML Syntax Elements must have a closing tag Elements must be properly nested

DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of Architecture Wei Peng  XML Syntax (IV):  XML elements can have attributes in the start tag, just like HTML, which are used to provide additional information about elements; such as robot.gif  Quote Styles, “male" = ‘male'? should be same as  It is preferable to store data at bottom level: Bill Hulk Reminder Don't forget to patch up my windows!

DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of Architecture Wei Peng  XML Syntax (V) – An attention here:  Avoid using attributes, because attributes are: 1.Not easily expandable – for future changes; 2.Not describe structures as child elements do; 3.More difficult to manipulate by program code; 4.Not easy to test against a DTD; 5.Not easy to read -- try to use elements to describe data.

DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of Architecture Wei Peng  XML Validation:  An XML document that has correct XML syntax is called “well formed”.  A valid XML file is well-formed file which has a Document Type Definition (DTD) and which conform to it.  The purpose of a DTD is to define the legal building blocks of an XML document. A DTD is for specifying the structure (only) of an XML file: it gives the names of the elements, attributes, and entities that can be used, and how they fit together.  XML Schema is an XML based alternative to DTD.  A valid file begins with a Document Type Declaration, but may have an optional XML Declaration pre- pended:...

DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of Architecture Wei Peng  DTD I (Document Type Definition):  A DTD can be declared inline in your XML document, or as an external reference.  Internal DOCTYPE declaration If the DTD is included in your XML source file, it should be wrapped in a DOCTYPE definition with the following syntax: <!DOCTYPE note [ ]> Bill Hulk Reminder Don't forget to patch up my windows!

DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of Architecture Wei Peng  DTD II (Document Type Definition):  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:  Example: Bill Hulk Reminder Don't forget to patch up my windows!  The file note.dtd looks like:

DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of Architecture Wei Peng  Why use DTD?  With DTD, each of your XML files can carry a description of its own format with it.  With a DTD, independent groups of people can agree to use a common DTD for interchanging data.  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.  DTD tutorial online at

DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of Architecture Wei Peng  XML Parser:  An XML processor (also called XML parser) evaluates the document to make sure it conforms to all XML specifications for structure and syntax.  Microsoft’s parser is called MSXML and is built into for IE versions 5.0 and above.  Netscape developed its own parser, called Mozilla, which is built into version 6.0 and above.  You can use parsers for validate your XML files or just  Use the online validation tool at

DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of Architecture Wei Peng  Browsing XML:  We focus on introducing IE 5.0 or above:  Viewing of XML documents  Full support for W3C DTD standards  XML embedded in HTML as Data Islands  Binding XML data to HTML elements  Transforming and displaying XML with XSL  Displaying XML with CSS

DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of Architecture Wei Peng  Viewing XML:  To view an XML document in IE 5.0 (and higher): 1. you can click on a link, 2. type the URL in the address bar, 3. or double-click on the name of an XML file in a files folder.  If you open an XML document in IE, it will display the document with color coded root and child elements.  Example: A CD category files written in XML: CD;CD The related style sheets files in CSS: CSSexample;CSSexample The file can be viewed in IE: CDXML;CDXML

DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of Architecture Wei Peng  A Problem Here:  When this two files are added into one file, how can I sort out? IBM Dell Computer Table  Since element names in XML are not fixed – we have a name conflict here!  XML Namespaces provide a method to avoid element name conflicts.

DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of Architecture Wei Peng  XML Namespace:  Solve this using a prefix added to the conflicted element names, like: IBM Dell Computer Table  The W3C namespace specification states that the namespace itself should be a Uniform Resource Identifier (URI).  Note that the address used to identify the namespace, is to give the namespace a unique name – may or may not containing information about the namespace.

DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of Architecture Wei Peng  References:  