Presentation is loading. Please wait.

Presentation is loading. Please wait.

XML and Enterprise Computing. What is XML? Stands for “Extensible Markup Language” –similar to SGML and HTML –document “tags” are used to define content.

Similar presentations

Presentation on theme: "XML and Enterprise Computing. What is XML? Stands for “Extensible Markup Language” –similar to SGML and HTML –document “tags” are used to define content."— Presentation transcript:

1 XML and Enterprise Computing

2 What is XML? Stands for “Extensible Markup Language” –similar to SGML and HTML –document “tags” are used to define content not just formatting –can be defined for individual industries Allows e-commerce applications to publish databases to Web more easily –merging of relational, O-O, and XML models

3 What is meant by a “document”? A form of presentation –paper, browser screen, voice, etc. Structure and organization of elements –memo, contract, recipe, etc. Informational content –text and numbers organized in relation to each other

4 Relationship Among Markup Languages SGML HTML XML

5 What are some current XML applications? On-line banking Push technology Web automation Database Publishing Software Distribution

6 Some sample HTML Personal Computers For Sale Maker: Acme PC Inc. Model: Blaster 555 Storage: RAM 72 MB Hard Disk 2 GB

7 XML Sample Acme PC Inc Blaster 555 72 2

8 How is XML Presented? XML includes a DTD (Document Type Definitions) –lists the element types and the order you are allowing them to occur –XML parser tests to see them are valid DTDs XSL (XML Style Language) –similar to cascading style sheets –contain presentation information




12 Another Example Convert a business card into an XML document –start with representative XML content –define DTD elements

13 XML Rules Open and close tags define “elements” and each element must have a closing tag (except for “empty” elements) Elements appear in a strict hierarchy; upper elements are parents of lower “child” elements. DTD is not mandatory but it ensures two parties define a docement’s contents the same. –DTDs constrain the data, the hierarchy of content, and the number of times it may appear

14 XML Rules (cont.) Elements –XML is case sensitive –must have 1 and only 1 “root” element –elements consist of an “element name” and “element content” –element content may consist of character or other data or even other elements embedded –an XML schema or “tree” describes hierarchy of elements –empty elements are indicated by a trailing backslash

15 Well-Formed XML Documents Have one root element All non-empty elements have start and stop tags that match exactly All empty elements have correct trailing slash Elements are strictly nested with no overlapping elements

16 Attributes Allow designer to add richer metadata to elements Consist of attribute name and attribute value –attribute values are bounded by quotes –can specify as many attributes for each element as you want –some authors use UC text for attribute names to easily distinguish <address ADDTYPE=“shipto” Robert ………

17 Defining a DTD Element declaration begins with “ –this contains an element name and content model surrounded by parentheses –elements can contain data or other elements or be empty to indicate it contains data we use (#PCDATA) if it contains other elements we list them in brackets (name, title, address, etc) empty elements use the key word “EMPTY”

18 Further DTD Specifications Designer can specify the number of times an element may appear –“?” means it may occur 0 or 1 times in document –“*” means it may occur 0 or more times –“+” means it may appear 1 or more times –can enumerate possible alternative with “|” –can specify an attribute is required with #REQUIRED –#IMPLIED means attribute may not have a value

19 Try another example Think of your resume, posted say on –What does html for this look like? Write your resume in XML???? –What is the “root” element? Why would this be valuable?

20 Another Example Creating an “order” in XML –include a “prolog”of XML document header information before root element may include processing instructions and DTD declaration ex. may include comments in prolog or after –start with





25 XML Document XML DTD XML Processor XML App

26 Some XML Processors Processors are either “validating” or “non- validating” Msxml –developed by MS Corp. Java and ActiveX versions Aelfred –Java-based XML. Microstar Corp. XP –Java-based XML processor by James Clark

Download ppt "XML and Enterprise Computing. What is XML? Stands for “Extensible Markup Language” –similar to SGML and HTML –document “tags” are used to define content."

Similar presentations

Ads by Google