IS 373—Web Standards Todd Will

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

Chapter 7 An Introduction to XML.
XML Craig Stewart Dr. Alexandra I. Cristea
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.
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.
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,
XML e X tensible M arkup L anguage 1/23.
Computer Information Systems Information Systems California State University Los Angeles Jongwook Woo CIS 561 Design of an E-Commerce Site XML Validation.
Sistemi basati su conoscenza XML Prof. M.T. PAZIENZA a.a
Sistemi basati su conoscenza XML Prof. M.T. PAZIENZA a.a
DT228/3 Web Development Introduction to XML.
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 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 Rashmi Kukanur. XML XML stands for Extensible Markup Language XML was designed to carry data XML and HTML designed with different.
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
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.
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.
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.
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 EXtensible Markup Language. Agenda Introduction to XML XML Rules XML Elements XML Attributes XML Validation XML Exercises XML Namespaces XML CDATA.
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.
1 Tutorial 11 Creating an XML Document Developing a Document for a Cooking Web Site.
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.
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.
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.
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.
Javascript & jQuery XML.
What is XML?.
Allyson Falkner Spokane County ISD
Presentation transcript:

IS 373—Web Standards Todd Will Intro to XML IS 373—Web Standards Todd Will

CIS 373---Web Standards-XML The Program Intro to XML How XML Is Used XML Syntax Elements Validation Browser Support Real Life Example CIS 373---Web Standards-XML

CIS 373---Web Standards-XML XML Introduction 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 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 (a standard setting body) CIS 373---Web Standards-XML

CIS 373---Web Standards-XML XML IS NOT HTML XML was designed to carry data. XML is not a replacement for HTML. XML and HTML were designed with different goals: 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. CIS 373---Web Standards-XML

XML Does not “Do” Anything XML was not designed to DO anything. XML was structures, stores, and sends information. The following example is a note to Tove from Jani, stored as XML: <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> You can see this has a body, to, from, and a subject, but you need another program to read and display this data CIS 373---Web Standards-XML

XML Is Free and Extensible No predefined tags HTML uses predefined tags (like <p>, <h1>, etc.). XML allows the author to define his own tags and his own document structure Tags are invented by the author of the document and describe the data contained VERY FLEXIBLE! CIS 373---Web Standards-XML

CIS 373---Web Standards-XML XML Uses XML can Separate Data from HTML XML can store required data outside of the html page Allows the use of xml to store data and html to display data More elegant than putting both on the same page XML can exchange data Data can be moved between two incompatible systems Data can be exchanged over the Internet Data can be read by many different applications (i.e. word, PDF, PowerPoint) Can be applied to Business to Business since data does not need to be reentered Time and cost savings CIS 373---Web Standards-XML

CIS 373---Web Standards-XML XML Uses (cont) XML Can share data XML stored in plain text Hardware and software independent Data can be used between old and new programs alike easily Data can be read and displayed in several different browsers XML can store data Data can be stored in plain text files or databases Generic applications can display the data (no need for proprietary software Data can be easily formatted or changed to enable people with disabilities to access the system Can be understood by voice readers Can easily change the formatting of the page to better suit blind people CIS 373---Web Standards-XML

CIS 373---Web Standards-XML Syntax Example XML document <?xml version="1.0" encoding="ISO-8859-1"?> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> CIS 373---Web Standards-XML

CIS 373---Web Standards-XML XML Syntax Broken Down <?xml version="1.0" encoding="ISO-8859-1"?> XML declaration Defines XML version (1.0) Defines character encoding (ISO-8859-1) Latin-1/West European character set All xml documents will have this declaration at the top of the document CIS 373---Web Standards-XML

CIS 373---Web Standards-XML XML Syntax Broken Down Root element <note> </note> This syntax describes the root element of the data in the document Should describe the information contained in the document In this case, the document is a note CIS 373---Web Standards-XML

CIS 373---Web Standards-XML XML Syntax Broken Down Child elements <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> All child elements should pertain to the root node XML is very descriptive Anyone should be able to look at the document and be able to understand it CIS 373---Web Standards-XML

XML Syntax – Closing Tags Illegal to omit closing tag when declaring an open tag In HTML, not all tags require a closing tag <p> this is a paragraph is legal in html XML syntax: <name>Todd is not legal <name>Todd</name> is legal XML root elements do not have a closing tag You should not have </xml> in a document The document can still be opened and read Root element is NOT an XML element Microsoft IE does require closed tags CIS 373---Web Standards-XML

CIS 373---Web Standards-XML Elements <book> <title>My First XML</title> <prod id="33-657" media="paper"></prod> <chapter>Introduction to XML <para>What is HTML</para> <para>What is XML</para></chapter> <chapter>XML Syntax <para>Elements must have a closing tag</para> <para>Elements must be properly nested</para> </chapter> </book> Book is the root element Title, Prod, Chapter are child elements of book Title, Prod, Chapter are sister (or sibling elements) CIS 373---Web Standards-XML

CIS 373---Web Standards-XML Element 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 Element names should be descriptive but not overly long CIS 373---Web Standards-XML

Are these valid element names? 1Book Book_Title Book Title Element names can also contain special and non-English characters but only can be read if the software supports them An XML document is often created from a database (good practice to use database field names for xml element names) CIS 373---Web Standards-XML

Elements can also contain attributes <person sex="female"> <firstname>Anna</firstname> <lastname>Smith</lastname> </person> Is The Same As <person> <sex>female</sex> Rule of thumb is to put data into elements, not as attributes CIS 373---Web Standards-XML

Avoid using attributes? Why you shouldn’t: Attributes cannot contain multiple values (child elements can) Attributes are not easily expandable (for future changes) Cannot easily add new data elements Attributes cannot describe structures (child elements can) Attributes are more difficult to manipulate through code Difficult to compare to a Document Type Definition (DTD) - which is used to define the legal elements of an XML document If you use attributes as containers for data, you end up with documents that are difficult to read and maintain. Try to use elements to describe data. Use attributes only to provide information that is not relevant to the data. CIS 373---Web Standards-XML

CIS 373---Web Standards-XML Do NOT Do This! <note day="12" month="11" year="2002" to="Tove" from="Jani" heading="Reminder" body="Don't forget me this weekend!"> </note> CIS 373---Web Standards-XML

Well Formed XML Documents A "Well Formed" XML document has correct XML syntax. A "Well Formed" XML document must conform to the rules as previously discussed 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 version="1.0" encoding="ISO-8859-1"?> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> CIS 373---Web Standards-XML

CIS 373---Web Standards-XML Conform to a DTD XML documents should conform to a previously agreed upon Document Type Definition (DTD) <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE note SYSTEM "InternalNote.dtd"> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> InternalNote.dtd is the Definition CIS 373---Web Standards-XML

CIS 373---Web Standards-XML Validate XML Document If software encounters an error in the document, the processing should stop Rationale is that all documents should be compatible Example – Internet Explorer throws an error if the document is not well formed In HTML, the browser can still understand the tags and can still look right even with several errors CIS 373---Web Standards-XML

CIS 373---Web Standards-XML Browser Support Most major browsers support XML Mozilla Firefox Version 1.0.2 support for XML (and CSS). Mozilla Expat for XML parsing and displays XML + CSS. Mozilla also has some support for Namespaces. Netscape As of version 8, Netscape uses the Mozilla engine, and therefore it has the same XML support as Mozilla. Opera As of version 9, Opera has support for XML (and CSS). Version 8 supports only XML + CSS. Internet Explorer As of version 6, Internet Explorer supports XML, Namespaces, CSS, and XPath. CIS 373---Web Standards-XML

CIS 373---Web Standards-XML Real Life XML XML News XML based news exchange Using such a standard makes it easier for both news producers and news consumers to produce, receive, and archive any kind of news information across different hardware, software, and programming languages CIS 373---Web Standards-XML

CIS 373---Web Standards-XML Example XML News <?xml version="1.0" encoding="ISO-8859-1"?> <nitf> <head> <title>Colombia Earthquake</title> </head> <body> <headline> <hl1>143 Dead in Colombia Earthquake</hl1> </headline> <byline> <bytag>By Jared Kotler, Associated Press Writer</bytag> </byline> <dateline> <location>Bogota, Colombia</location> <date>Monday January 25 1999 7:28 ET</date> </dateline> </body> </nitf> CIS 373---Web Standards-XML

CIS 373---Web Standards-XML Conclusion XML is very useful to carry data Cannot be used to display data Should be well formed (all open tags should have a close tag) Most programs today store some data in XML format Do a search on your hard drive for *.xml CIS 373---Web Standards-XML

CIS 373---Web Standards-XML For Next Week XML homework assignment (see class site for details) Can start work on this now if you want Any problems, please contact me Read Zeldman chapter 8 CIS 373---Web Standards-XML