1   introduction to xml
Upcoming SlideShare
Loading in...5
×
 

1 introduction to xml

on

  • 854 views

XML-XML

XML-XML

Statistics

Views

Total Views
854
Views on SlideShare
854
Embed Views
0

Actions

Likes
0
Downloads
11
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

1   introduction to xml 1 introduction to xml Presentation Transcript

  • Introduction to XML Atul Kahate [email_address]
  • Roots of XML – EDI Technology
  • 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
  • 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
  • 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
  • Sample EDI Document
    • Interchange Control Header – Electronic Envelope
    • Functional Group Header – Purchase Order
    • Transaction Set Header – Purchase Order A100
    • Data Segment Header – Source
    • Data Element – Terms of Transaction
    • Data Element – Date and Time
    • Data Segment Header – Details
    • Data Element – Item Number
    • Data Element – Item Description
    • Data Element – Item Quantity
    • Data Element – Item Price
    • Transaction Set Footer – Purchase Order A100
    • Functional Group Footer – Purchase Order
    • Interchange Control Header – Electronic Envelope
  • EDI and the Internet Web browser XML EDI VAN Provider ASC X12
  • XML Theory
  • 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)
  • 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>
  • Problems with HTML – 1
    • No syntax checking
      • No provision for validating HTML documents
    • No structure
      • Display-related characteristics are considered and nothing else
  • 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)
  • 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
  • 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
  • Problems with Data Exchange
    • Application-related
      • Problems solved by EDI, but other problems raised (Cost, Infrastructure, etc)
    • Technology-related
      • Incompatible technologies used
  • Technology-related Problems Organization X Oracle Organization Y IMS
  • Technology-related Problems Organization X Oracle Organization Y IMS Text Text
  • Technology-related Problems Organization X Oracle Organization Y IMS EDI EDI
  • Technology-related Problems Organization X Oracle Organization Y IMS XML XML
  • 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
  • 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>
  • Hierarchy of Data
    • XML presents data in the form of a hierarchy
      • Book
      • Chapter
      • Section
      • Paragraph
      • Sentence
      • Word
      • Character
  • Output of the XML Document
  • 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>
  • Another XML Example
    • <? xml version =&quot;1.0&quot; encoding =&quot;utf-8&quot; ?>
    • < 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?