Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to XML. XML - Connectivity is Key Need for customized page layout – e.g. filter to display only recent data Downloadable product comparisons.

Similar presentations


Presentation on theme: "Introduction to XML. XML - Connectivity is Key Need for customized page layout – e.g. filter to display only recent data Downloadable product comparisons."— Presentation transcript:

1 Introduction to XML

2 XML - Connectivity is Key Need for customized page layout – e.g. filter to display only recent data Downloadable product comparisons – e.g. import to spreadsheet features, prices, etc. Application integration – translation of data from various application sources e.g. human resource, accounts, projects Data integration – coherent DB views Interchangeable files – enhance software development via number of tools, exchange information effortlessly

3 Need for software to spontaneously connect across the globe, exchange information, process and record exchanges Problems evident in Web pages – undifferentiated text makes search ability problematic, need to for human intervention HTML – page layout language, little scope for data analysis, need to slice and dice manually

4 Metadata – first step Spontaneous information exchange requires metadata One party indicates what each piece of information means, two or more parties agree on meaning, facilitating organisation of data in database schema Formal way to describe what a piece of data means Difficulty – parties need to agree on meaning

5 Shared Context Formal description of rules metadata must follow Applies to particular type of document, serves as contract between document sender and receiver One party can design shared context, post on internet so available to anyone who wishes to use/add

6 XML Approach Simple approach to metadata and shared context Authors add metadata through tags William Shakespeare Document designers add shared context through Document Type Definitions (DTDs) – a set of declarations that specify allowable order, structure and attributes of tags for particular document Structured via URL so any party can spontaneously access DTD, interpret its rules, and process the document

7 Goals of XML – 1. It shall be straightforward to use XML over the Internet 2. XML shall support a wide variety of applications 3. XML shall be compatible with SGML 4. It shall be easy to write programs that process XML documents 5. The number of optional features in XML is to be kept to an absolute minimum, ideally zero XML documents should be human-legible and reasonably clear XML design should be prepared quickly The design of XML should be formal and concise XML documents shall be easy to create Terseness in XML markup is of minimal importance

8 XML Conceptual Model Human and machine readability Defining content Defining structure Separation of content from relationships Separation of structure from presentation

9 XML software support (5) Fundamental software components – low level XML capabilities such as parsing and generating documents Software development tool support – tools for rapid application development, include utilities for manipulating XML documents and integrating with document development tools Document development tools – define DTDs and author XML documents easier than text editors. Graphical modeling tools/browsers for directly manipulating XML documents, support existing web content development and management

10 XML software support Web infrastructure support – to develop adaption momentum, browsers and servers must support XML – anyone can view XML from standard browser Translation components – convert all data formats to XML, similar to WPs supporting ‘save as rich text format’ feature Inevitable barriers to deployment = need to overcome

11 XML Specifications (2) Document portion – specifies how to use tagged markup to indicate meaning of data DTD portion – specifies how to indicate allowable structure for a class of XML document

12 Simple example - content David John Brown Software Technology Analyst 028 7137 5555 07741265894

13 Simple example – DTD CONSTRAINTS ? 0 or 1 elements * 0 or more

14 Elements Fundamental unit of XML – author-specific chunk of information Consists of element name and element content One element at top – root or document element Four types of allowable content data content – contain only data Element content – contain only other elements Empty – contain neither data or elements Mixed content – contain both data and elements (viewed as poor practice) Attributes – attribute name and value, bounded by quotation marks database DBTYPE=“Oracle” column DATATYPE=“String”

15 Well formed XML There is one root element All nonempty elements have start tags and end tags that match exactly All empty elements have the correct empty tag syntax Elements are strictly nested – no overlapping elements

16 Entities Elements and attributes are logical mechanisms – enable authors to specify logical meaning of document content Entities are structural mechanisms – enable authors to manipulate physical structure Entity associates an entity name with a fragment of content

17 Entities in XML (4) Internal parsed entities – would allow “&author” within document and have it replaced by Kevin Parks External parsed entities – include entire file as part of document <!ENTITY address_section SYSTEM “./address.xml” <!ENTITY lineitems_section SYSTEM “./lineitems.xml” <!ENTITY payment_section SYSTEM “./payment.xml” &address_section; &lineitems_section; &payment_section;

18 Unparsed entities – allow authors to insert arbitrary data in document – may not be XML, XML process will not attempt to parse such an entity Parameter entities – work only in DTDs to specify an enumerated list of allowable attribute values. CARDTYPE (%card_list;)#REQUIRED>


Download ppt "Introduction to XML. XML - Connectivity is Key Need for customized page layout – e.g. filter to display only recent data Downloadable product comparisons."

Similar presentations


Ads by Google