Download presentation
Presentation is loading. Please wait.
Published byJerome Charles Modified over 9 years ago
1
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop1 Grenoble Ecole de Management MEDFORIST Workshop XML in Brief Asuman Dogac Middle East Technical University Ankara Turkey asuman@srdc.metu.edu.tr
2
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 2/29 XML Extensible Markup Language has become the “universal” standard for representing data XML started out as a standard data exchange format for the Web Yet, it has quickly become the fundamental instrument in the development of Web-based online information services and electronic commerce applications Almost all recent electronic commerce standards are based on XML
3
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 3/29 XML A subset of SGML (Standard Generalized Markup Language); it is defined by World Wide Web Consortium HTML enables a universal method of displaying data; XML provides a universal method of describing data Provides the ability to describe data in an open text- based format and deliver it using standard http protocol
4
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 4/29 XML At present, many applications on the Web use XML for hosting large amounts of structured and semi- structured data Representation of information in XML documents has been increasing at an astonishing pace According to Meta Group, by 2003, about 65% of corporate data will be stored in an XML format
5
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 5/29 XMLMessaging Internet Electronic Data Interchange Large Enterprise XML: The Unifying Technology Mail, Phone, FAX, Email Small, Medium Enterprise
6
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 6/29 Browse the Web Program the Web Maturity of Web Infrastructure Technology Web Services XML Programmability HTML Web Pages Presentation Standard FTP, E -mail, Gopher T C P/IP Connectivity Innovation
7
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 7/29 XML helps address the challenge The data is self-describing e.g. the meaning of the data is included: identifiers surround every bit of data, indicating what it means Far more flexible method of representing transmitted information e.g. batched orders sent together can have different fields and format without breaking apps on each end Open, standard technologies for moving, processing and validating the data e.g. the XML parser can automatically parse, validate, and feed the information to an application, instead of every application having to include this functionality
8
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 8/29 XML: An Example “Electronic Commerce”, “100”, “Turban”, “25”, “Addison- Wesley” Data stream in a typical interface… Electronic Commerce 100 Turban 25 Addison-Wesley Same data stream in XML…
9
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 9/29 Mark up (or Tagging) XML uses textual markups to define data An XML document is comprised of a collection of tagged elements each containing a start tag ( ), an end tag ( ), and the content between the two tags Example: 1234ABCD
10
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 10/29 Tagging Data in XML 1234ABCD Considering the content only, it is not possible to understand what 1234ABCD stands for The tag name PONumber intuitively tells that the content is a purchase order number Similarly, an XML element might be tagged as name, gender, birth date, salary, price,… XML is extensible in the sense that users can create their own vocabularies, the tag names are neither predefined nor limited
11
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 11/29 Adding Structure to data Tagged elements may be nested to any depth to provide structured data, or may be repeated to represent a list of values A valid XML document usually contains a single root element, which constitutes the top-level of nesting In other words, a valid XML document represents a tree of elements
12
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 12/29 Giving Meaning and Structure to Data 1234ABCD 20030601 16 95 … Start Tag An Element An Attribute Another Element End Tag Data
13
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 13/29 Giving Structure to Data PurchaseOrderRequest PurchaseOrderDate PONumber LineItem ItemEAN_IdentificationQuantityOrderedUnitPrice
14
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 14/29 Document Type Definition (DTD) The principle purpose of the DTD is to declare the hierarchy of document elements A document type definition defines: The name of the elements, The content model of each element, How often and in which order elements may appear, If the end-tags can be shortcut, The possible presence of attributes and their default values, The names of the entities
15
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 15/29 An Example DTD <!DOCTYPE simple [...]>
16
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 16/29 DTDs A DTD specifies the structure of an XML element by specifying the names of its sub-elements and attributes Sub-element structure is specified using the operators * : set with zero or more elements + : set with one or more elements ?: optional | : or All values are assumed to be string values, unless the type is ANY in which case the value can be an arbitrary XML fragment
17
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 17/29 XML Namespaces Namespaces are a simple and straightforward way to distinguish names used in XML documents, no matter where they come from The only reason namespaces exist, is to give elements and attributes programmer-friendly names that will be unique across the whole Internet
18
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 18/29 Example <h:html xmlns:xdc="http://www.xml.com/books" xmlns:h="http://www.w3.org/HTML/1998/html4"> Book Review XML: A Primer Author Price Pages Date Simon St. Laurent 31.98 352 1998/01
19
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 19/29 XML Namespaces The prefixes are linked to the full names using the attributes on the top element.whose names begin xmlns:. The prefixes are just shorthand placeholders for the full names Those full names are URLs, i.e. Web addresses
20
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 20/29 Extensibility in XML Anyone can invent new tags and attach a meaning to those tags But if every user creates its own XML definition for describing his data, it is not possible to achieve interoperability For example, one may prefer to use the tag name “POR”, while another prefers using the tag name “PurchaseOrderReq” In other words, a tagged document is not very useful without some kind of agreement on the tags among inter-operating applications
21
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 21/29 Many Efforts for Standardized Tags… HL7 for healthcare RosettaNet for supply chain integration in Information Technology and Electronic Components domain ebXML for eBusiness Common Business Library (CBL) for electronic catalogs, purchase orders, etc. …
22
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 22/29 XML Parsers A parser takes an XML document and makes its structure and content available to an application through an API There are two main Application Programming Interfaces (APIs) for writing parsers: Document Object Model (DOM) and Simple API for XML (SAX) Today, many parsers are both DOM and SAX compliant
23
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 23/29 XML DOM Parser Application Code Initialize Parser In memory DOM: Perform Processing XML Parser XML Document Begin parsing Parsing complete A parser validates and makes the data contained in an XML document available to the application
24
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 24/29 XSLT Processor XML Document XSL Style Sheet 2 Output from Style Sheet 1 Output from Style Sheet 2 XSL Style Sheet 1 Parser XSLT Processor Converts an XML document to another form An XSL style sheet is a set of transformation instructions for converting a source XML document to a target document
25
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 25/29 table.xsl bar.xsl art.xsl
26
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 26/29 Why XML? EDIXML BGM+220+1234ABCD+9' DTM+137:20030601:102' LIN+1' PIA+5+9344:EN+1078341ITEM:VP' QTY+21:16:EA' PRI+AAA:95' LIN+2' … 1234ABCD 20030601 16 95 …
27
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 27/29 XML vs EDI XML is an open human- readable, text format EDI documents are typically in a compressed, machine-only readable form XML is designed to require one customised mapping per industry grouping, so most companies will be able to work to one format and use XML EDI traditionally requires customised mapping of each new trading partners document format XML requires a reliable PC with an Internet connection EDI typically requires dedicated servers that cost from USD10,000 and up
28
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 28/29 XML vs EDI XML documents are typically sent via the Internet - i.e. a relatively low-cost public network EDI documents are typically sent via private and relatively expensive value-added networks (VANs) XML in Internet-based has low ongoing flat-rate costs using existing Internet connections and relatively low-cost Web Servers EDI can involve high on-going transaction based costs keeping up the connection to the EDI network and keeping the servers up and running
29
A. Dogac Grenoble Ecole de Managenent MEDFORIST Workshop 29/29 XML vs EDI XML appears to have no upper limit in terms of numbers of users EDI is estimated to be limited to 300,000 companies worldwide and about 20% of their suppliers because of operational costs and complexity XML is being developed in a world of shared software development populated by many low-cost tools and open source projects. EDI was traditionally built from the ground up in semi-isolation without being able to share resources with other programs
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.