Presentation is loading. Please wait.

Presentation is loading. Please wait.

Supply Chain & Enterprise Systems eXtensible Markup Language (XML) Basics MIS 6483 – Spring 2009 www.suse1.astate.edu/~jseydel Guest Instructor: John.

Similar presentations


Presentation on theme: "Supply Chain & Enterprise Systems eXtensible Markup Language (XML) Basics MIS 6483 – Spring 2009 www.suse1.astate.edu/~jseydel Guest Instructor: John."— Presentation transcript:

1

2 Supply Chain & Enterprise Systems eXtensible Markup Language (XML) Basics MIS 6483 – Spring 2009 www.suse1.astate.edu/~jseydel Guest Instructor: John Seydel, Ph.D.

3 Student Objectives Upon completion of this material you should be able to Describe the basics of what a markup language is and how it works Discuss where XML fits as a markup language Identify opportunities to use XML as a data wrapper Create XML files to be used in web applications Summarize several common uses of XML Discuss what a DTD does Identify several applications that currently use XML

4 Let’s Start with an Overview of Computer Languages  Programming languages Standalone  Traditional (e.g., COBOL)  Object-oriented (e.g., Java, VB.NET) And/or scripting languages (rely on other components)  JavaScript  Others (e.g., PHP)  Markup languages (e.g., SGML, HTML, XHTML, DHTML)  Stylesheet languages (e.g., CSS, XSL)  Database languages (e.g., SQL)  How about XML... ?

5 Markup Languages: A High Level Perspective

6 Some Markup Basics: Sample HTML for a Starter Web Page Home Page for Suzy Student Suzy Student Welcome to My Website! This site is currently under construction, so please come back later.

7 Summary of the Basic HTML Page  Document contains Title Page header Second level heading Short paragraph  Markup elements: html head body title h1 h2 p  Note the hierarchy  Refer to another example (see handout)...

8 eXtensible Markup Language  XML facilitates the interchange of information across disparate applicationsdisparate applications  Not a markup language in itself; instead XML is a meta language  XML can be used to create customized markup Generally not for web pages; exceptions  Ajax (note the “X”)  RSS feeds Instead for applications; consider the file format used for Office 2007 documents  Compressed XML files  Surprisingly smaller than binary files  Note that XHTML is essentially just HTML reformulated to conform to XML specifications  XML requires more than HTML, in particular a processing application

9 Exercise: Look at Some XML Examples  First, login locally as peachtree (password is accounting2008)  Microsoft PowerPoint 2007 Open PowerPoint Create a three slide presentation and save someplace you’ll be able to find it Close PowerPoint and navigate to the file Is this XML?  Now, navigate to ASU’s home page Select “NEWS & EVENTS” Click on RSS View the source code  If possible, use RDC to look at SimNet data

10 XML Components  A processing application Parses the code and then does something with it  Checks for well-formed documents  May also validate Includes one or more of the following  Desktop application  Web browser  Other... ?  Code XML document DTD Stylesheet  CSS (preferred for the time being)  XSL (not well supported yet)

11 Why a DTD?  With XML, we can Create our own markup language Use someone else’s markup  Thus, a DTD (i.e., DOCTYPE) can be used to ensure completeness and consistency Tells the user agent what the tags mean Provides syntax for the tags  Note: XML documents resemble HTML documents, but the tags are different The DTD for HTML is built into browsers User agents need to look externally for DTDs for XML documents  More later (if time permits)

12 Why Use XML?  Makes data free of context  Can do much more with it  Not restricted to standard browsers  Can render/process same set of data numerous ways, depending upon the DTD employed  Allows for special purpose treatment of content (e.g., chemical formulae, house plans, etc.)  Hence Application integration through marked up data Greater overall flexibility

13 A Sample XML Document  Language: RML (Recipe Markup Language)  Note XML declaration DTD for element Content  How would this look?

14 Sample RML Document Bean Burrito 1 can refried beans 1 small onion 3 flour tortillas Empty beans into saucepan and heat until beans are smooth. Then warm tortillas in microwave oven for 30 seconds. Spread 1/3 of beans on each tortilla, sprinkle with onions, roll, and serve.

15 Notice Some Things  General guidelines: XML declaration and DTD One tag contains all the others (root) All elements (including empty elements) have start/end Elements are nested (e.g., item within ingredient)  Hierarchical  Parent/child relationships Attribute values quoted  In other words, the same rules we should be applying to HTML (i.e., XHTML)  Consider another XML document...

16 Look Familiar? <!DOCTYPE html PUBLIC "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“ > Home Page for Suzy Student Suzy Jo Student Welcome to my web site; Here's what you'll find:...

17 An XML Exercise  Web application (Ajax)  Involves Local files to be editted; save in c:\xampp\htdocs  HTML file (get from website)  XML file (create in NotePad) XML file Remote files  JavaScript  CSS  Images  Working version: www.suse1.astate.edu/~jseydel/handouts/xml_html.php

18 Now, the DTD  Can be within the XML document  More often external  Where can we find one to look at?  How about ANY web page... ?  Defines: elements, content, attributes, parent/child, entities

19 DTDs Specify Element Declarations  General syntax  Consider XHTML elements img p ul div

20 Finally, Attribute Lists  General syntax  XHTML attributes (for tag) src alt width height onMouseOver...

21 Summary of Objectives Describe the basics of what a markup language is and how it works Discuss where XML fits as a markup language Identify opportunities to use XML as a data wrapper Create XML files to be used in web applications Summarize several common uses of XML Discuss what a DTD does Identify several applications that currently use XML

22 Appendix

23 Facilitating B2B eCommerce

24 XML File for Ajax Example Name Fruit Vegetable Captain Banana Zucchini Admiral Melon Carrot Midshipman Orange Potatoe

25 File Formats Supported by the Web

26 Basic Architecture of the Web

27 More Sophisticated Web Architecture


Download ppt "Supply Chain & Enterprise Systems eXtensible Markup Language (XML) Basics MIS 6483 – Spring 2009 www.suse1.astate.edu/~jseydel Guest Instructor: John."

Similar presentations


Ads by Google