1 introduction to xml

Post on 16-May-2015

803 Views

Category:

Education

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

XML-XML

TRANSCRIPT

Introduction to XML

Atul Kahate

akahate@gmail.com

Roots of XML – EDI Technology

Introduction to XML 3

EDI and XML XML is a data description language

It has its roots in EDI

EDI technology is still in use, but is being replaced with XML

Introduction to XML 4

What is EDI? Electronic Data Interchange (EDI)

Related to the history of XML Document exchange standard

e.g. Purchase Order (PO), Sales Order (SO) Documents are inter-related

But their formats differ! Aims at:

Making formats uniform Document exchanges easier

Introduction to XML 5

EDI Example Company A wants to buy spare

parts from company B Company A prepares a Purchase

Order (PO) Sends it to company B Company B sends the goods, and a

Sales Order (SO) to B Formats of the SO and the PO differ

Introduction to XML 6

Sample EDI DocumentInterchange Control Header – Electronic Envelope

Functional Group Header – Purchase OrderTransaction Set Header – Purchase Order A100

Data Segment Header – SourceData Element – Terms of TransactionData Element – Date and Time

Data Segment Header – DetailsData Element – Item NumberData Element – Item DescriptionData Element – Item QuantityData Element – Item Price

Transaction Set Footer – Purchase Order A100Functional Group Footer – Purchase Order……

Interchange Control Header – Electronic Envelope

Introduction to XML 7

EDI and the Internet

Web browser

XML

EDI VAN Provider

ASC X12

XML Theory

Introduction to XML 9

History of XML Extensible Markup Language (XML)

Based on Standard Generalized Markup Language (SGML)

Quite complex Defines markup to represent logical

structure of documents Independent of technologies and platforms Meta language (Language for describing

other languages)

Introduction to XML 10

What was there before XML? Hyper Text Markup Language (HTML)

Tagging language Used for displaying text in Web browsers Quite simple to code Example

<H1> Fruit description </H1><P> Color = Red </P>…

Introduction to XML 11

Problems with HTML – 1 No syntax checking

No provision for validating HTML documents

No structure Display-related characteristics are

considered and nothing else

Introduction to XML 12

Problems with HTML – 2 Not content-aware

Use of tags such as <H3> instead of <Name>

Not international Based on ASCII, so limited language

support (XML is Unicode-based)

Introduction to XML 13

Problems with HTML – 3 Not suitable for data interchange

Very little information inside a document is identified

Not object-oriented Programmers with OO skills find it

difficult to deal with HTML

Introduction to XML 14

Why XML? Gels well with existing Web

protocols such as HTTP and MIME Supports a wide variety of

applications Has programming support Optional features are minimum XML documents are easier to read

for humans

Introduction to XML 15

Problems with Data Exchange Application-related

Problems solved by EDI, but other problems raised (Cost, Infrastructure, etc)

Technology-related Incompatible technologies used

Introduction to XML 16

Technology-related Problems

Organization X

Oracle

Organization Y

IMS

Introduction to XML 17

Technology-related Problems

Organization X

Oracle

Organization Y

IMSText Text

Introduction to XML 18

Technology-related Problems

Organization X

Oracle

Organization Y

IMSEDI EDI

Introduction to XML 19

Technology-related Problems

Organization X

Oracle

Organization Y

IMSXML XML

Introduction to XML 20

XML Features Modularity

Structure of XML documents can be decided based on needs

Extensibility Linking physically different

documents is possible Data orientation

Focus is on data, so is machine-friendly

Introduction to XML 21

XML Example<?xml version=“1.0”?><address-book>

<entry><name>

<first> Ram </first><last> Joshi </last>

</name><address>

<building> Navi Peth </building><house-number> 304 </house-number><city> Pune </city><pin> 411001 </pin>

</address><res-phone> 27289103 </res-phone><mobile> 93292-91010 </mobile><email> ram@rediffmail.com</email>

</entry></address-book>

Introduction to XML 22

Hierarchy of Data XML presents data in the form of a

hierarchyBook

ChapterSectionParagraphSentenceWordCharacter

Introduction to XML 23

Output of the XML Document

Introduction to XML 24

In HTML, it would be …<HTML><HEAD>

<H3> Ram </H3><H3> Joshi </H3><H4> Navi Peth </H4><H4> 304 </H4><H4> Pune <H4><H4> 411001 </H4></Head>

</HTML>

Introduction to XML 25

Another XML Example<?xml version="1.0" encoding="utf-8" ?><examination> <student> <roll_number>1</roll_number> <student_name>Harish</student_name> <course>Msc</course> <total_marks>275</total_marks> <out_of>400</out_of> <rank>5</rank> </student> <student> <roll_number>2</roll_number> <student_name>Jyotsna</student_name> <course>Msc</course> <total_marks>283</total_marks> <out_of>400</out_of> <rank>4</rank> </student> <student> <roll_number>3</roll_number> <student_name>Bhupendra</student_name> <course>Msc</course> <total_marks>251</total_marks> <out_of>400</out_of> <rank>7</rank> </student> <student> <roll_number>4</roll_number> <student_name>Senthil</student_name> <course>Msc</course> <total_marks>271</total_marks> <out_of>400</out_of> <rank>14</rank> </student></examination>

Thank you!

Any Questions?

top related