Introduction to XML Atul Kahate [email_address]
Roots of XML – EDI Technology
EDI and XML <ul><li>XML is a data description language </li></ul><ul><li>It has its roots in EDI </li></ul><ul><li>EDI tec...
What is EDI? <ul><li>Electronic Data Interchange (EDI) </li></ul><ul><ul><li>Related to the history of XML </li></ul></ul>...
EDI Example <ul><li>Company A wants to buy spare parts from company B </li></ul><ul><ul><li>Company A prepares a Purchase ...
Sample EDI Document <ul><li>Interchange Control Header – Electronic Envelope </li></ul><ul><li>Functional Group Header – P...
EDI and the Internet Web browser XML EDI VAN Provider ASC X12
XML Theory
History of XML <ul><li>Extensible Markup Language (XML) </li></ul><ul><ul><li>Based on Standard Generalized Markup Languag...
What was there before XML? <ul><li>Hyper Text Markup Language (HTML) </li></ul><ul><ul><li>Tagging language </li></ul></ul...
Problems with HTML – 1  <ul><li>No syntax checking </li></ul><ul><ul><li>No provision for validating HTML documents </li><...
Problems with HTML – 2 <ul><li>Not content-aware </li></ul><ul><ul><li>Use of tags such as <H3> instead of <Name> </li></u...
Problems with HTML – 3 <ul><li>Not suitable for data interchange </li></ul><ul><ul><li>Very little information inside a do...
Why XML? <ul><li>Gels well with existing Web protocols such as HTTP and MIME </li></ul><ul><li>Supports a wide variety of ...
Problems with Data Exchange <ul><li>Application-related </li></ul><ul><ul><li>Problems solved by EDI, but other problems r...
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 <ul><li>Modularity </li></ul><ul><ul><li>Structure of XML documents can be decided based on needs </li></ul><...
XML Example <ul><li><?xml version=“1.0”?> </li></ul><ul><li><address-book> </li></ul><ul><li><entry> </li></ul><ul><li><na...
Hierarchy of Data <ul><li>XML presents data in the form of a hierarchy </li></ul><ul><ul><li>Book </li></ul></ul><ul><ul><...
Output of the XML Document
In HTML, it would be … <ul><li><HTML> </li></ul><ul><li><HEAD> </li></ul><ul><li><H3> Ram </H3> </li></ul><ul><li><H3> Jos...
Another XML Example <ul><li><? xml   version =&quot;1.0&quot;  encoding =&quot;utf-8&quot; ?> </li></ul><ul><li>< examinat...
Thank you! Any Questions?
Upcoming SlideShare
Loading in …5
×

1 introduction to xml

1,181 views

Published on

XML-XML

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,181
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
33
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

1 introduction to xml

  1. 1. Introduction to XML Atul Kahate [email_address]
  2. 2. Roots of XML – EDI Technology
  3. 3. EDI and XML <ul><li>XML is a data description language </li></ul><ul><li>It has its roots in EDI </li></ul><ul><li>EDI technology is still in use, but is being replaced with XML </li></ul>
  4. 4. What is EDI? <ul><li>Electronic Data Interchange (EDI) </li></ul><ul><ul><li>Related to the history of XML </li></ul></ul><ul><ul><li>Document exchange standard </li></ul></ul><ul><ul><ul><li>e.g. Purchase Order (PO), Sales Order (SO) </li></ul></ul></ul><ul><ul><li>Documents are inter-related </li></ul></ul><ul><ul><ul><li>But their formats differ! </li></ul></ul></ul><ul><ul><li>Aims at: </li></ul></ul><ul><ul><ul><li>Making formats uniform </li></ul></ul></ul><ul><ul><ul><li>Document exchanges easier </li></ul></ul></ul>
  5. 5. EDI Example <ul><li>Company A wants to buy spare parts from company B </li></ul><ul><ul><li>Company A prepares a Purchase Order (PO) </li></ul></ul><ul><ul><li>Sends it to company B </li></ul></ul><ul><ul><li>Company B sends the goods, and a Sales Order (SO) to B </li></ul></ul><ul><ul><li>Formats of the SO and the PO differ </li></ul></ul>
  6. 6. Sample EDI Document <ul><li>Interchange Control Header – Electronic Envelope </li></ul><ul><li>Functional Group Header – Purchase Order </li></ul><ul><li>Transaction Set Header – Purchase Order A100 </li></ul><ul><li>Data Segment Header – Source </li></ul><ul><li>Data Element – Terms of Transaction </li></ul><ul><li>Data Element – Date and Time </li></ul><ul><li>Data Segment Header – Details </li></ul><ul><li>Data Element – Item Number </li></ul><ul><li>Data Element – Item Description </li></ul><ul><li>Data Element – Item Quantity </li></ul><ul><li>Data Element – Item Price </li></ul><ul><li>Transaction Set Footer – Purchase Order A100 </li></ul><ul><li>Functional Group Footer – Purchase Order </li></ul><ul><li>… </li></ul><ul><li>… </li></ul><ul><li>Interchange Control Header – Electronic Envelope </li></ul>
  7. 7. EDI and the Internet Web browser XML EDI VAN Provider ASC X12
  8. 8. XML Theory
  9. 9. History of XML <ul><li>Extensible Markup Language (XML) </li></ul><ul><ul><li>Based on Standard Generalized Markup Language (SGML) </li></ul></ul><ul><ul><ul><li>Quite complex </li></ul></ul></ul><ul><ul><ul><li>Defines markup to represent logical structure of documents </li></ul></ul></ul><ul><ul><ul><li>Independent of technologies and platforms </li></ul></ul></ul><ul><ul><ul><li>Meta language ( Language for describing other languages) </li></ul></ul></ul>
  10. 10. What was there before XML? <ul><li>Hyper Text Markup Language (HTML) </li></ul><ul><ul><li>Tagging language </li></ul></ul><ul><ul><li>Used for displaying text in Web browsers </li></ul></ul><ul><ul><li>Quite simple to code </li></ul></ul><ul><ul><li>Example </li></ul></ul><ul><ul><ul><li><H1> Fruit description </H1> </li></ul></ul></ul><ul><ul><ul><li><P> Color = Red </P> </li></ul></ul></ul><ul><ul><ul><li>… </li></ul></ul></ul>
  11. 11. Problems with HTML – 1 <ul><li>No syntax checking </li></ul><ul><ul><li>No provision for validating HTML documents </li></ul></ul><ul><li>No structure </li></ul><ul><ul><li>Display-related characteristics are considered and nothing else </li></ul></ul>
  12. 12. Problems with HTML – 2 <ul><li>Not content-aware </li></ul><ul><ul><li>Use of tags such as <H3> instead of <Name> </li></ul></ul><ul><li>Not international </li></ul><ul><ul><li>Based on ASCII, so limited language support (XML is Unicode-based) </li></ul></ul>
  13. 13. Problems with HTML – 3 <ul><li>Not suitable for data interchange </li></ul><ul><ul><li>Very little information inside a document is identified </li></ul></ul><ul><li>Not object-oriented </li></ul><ul><ul><li>Programmers with OO skills find it difficult to deal with HTML </li></ul></ul>
  14. 14. Why XML? <ul><li>Gels well with existing Web protocols such as HTTP and MIME </li></ul><ul><li>Supports a wide variety of applications </li></ul><ul><li>Has programming support </li></ul><ul><li>Optional features are minimum </li></ul><ul><li>XML documents are easier to read for humans </li></ul>
  15. 15. Problems with Data Exchange <ul><li>Application-related </li></ul><ul><ul><li>Problems solved by EDI, but other problems raised (Cost, Infrastructure, etc) </li></ul></ul><ul><li>Technology-related </li></ul><ul><ul><li>Incompatible technologies used </li></ul></ul>
  16. 16. Technology-related Problems Organization X Oracle Organization Y IMS
  17. 17. Technology-related Problems Organization X Oracle Organization Y IMS Text Text
  18. 18. Technology-related Problems Organization X Oracle Organization Y IMS EDI EDI
  19. 19. Technology-related Problems Organization X Oracle Organization Y IMS XML XML
  20. 20. XML Features <ul><li>Modularity </li></ul><ul><ul><li>Structure of XML documents can be decided based on needs </li></ul></ul><ul><li>Extensibility </li></ul><ul><ul><li>Linking physically different documents is possible </li></ul></ul><ul><li>Data orientation </li></ul><ul><ul><li>Focus is on data, so is machine-friendly </li></ul></ul>
  21. 21. XML Example <ul><li><?xml version=“1.0”?> </li></ul><ul><li><address-book> </li></ul><ul><li><entry> </li></ul><ul><li><name> </li></ul><ul><li><first> Ram </first> </li></ul><ul><li><last> Joshi </last> </li></ul><ul><li></name> </li></ul><ul><li><address> </li></ul><ul><li><building> Navi Peth </building> </li></ul><ul><li><house-number> 304 </house-number> </li></ul><ul><li><city> Pune </city> </li></ul><ul><li><pin> 411001 </pin> </li></ul><ul><li></address> </li></ul><ul><li><res-phone> 27289103 </res-phone> </li></ul><ul><li><mobile> 93292-91010 </mobile> </li></ul><ul><li><email> ram@rediffmail.com</email> </li></ul><ul><li></entry> </li></ul><ul><li></address-book> </li></ul>
  22. 22. Hierarchy of Data <ul><li>XML presents data in the form of a hierarchy </li></ul><ul><ul><li>Book </li></ul></ul><ul><ul><li>Chapter </li></ul></ul><ul><ul><li>Section </li></ul></ul><ul><ul><li>Paragraph </li></ul></ul><ul><ul><li>Sentence </li></ul></ul><ul><ul><li>Word </li></ul></ul><ul><ul><li>Character </li></ul></ul>
  23. 23. Output of the XML Document
  24. 24. In HTML, it would be … <ul><li><HTML> </li></ul><ul><li><HEAD> </li></ul><ul><li><H3> Ram </H3> </li></ul><ul><li><H3> Joshi </H3> </li></ul><ul><li><H4> Navi Peth </H4> </li></ul><ul><li><H4> 304 </H4> </li></ul><ul><li><H4> Pune <H4> </li></ul><ul><li><H4> 411001 </H4> </li></ul><ul><li></Head> </li></ul><ul><li></HTML> </li></ul>
  25. 25. Another XML Example <ul><li><? xml version =&quot;1.0&quot; encoding =&quot;utf-8&quot; ?> </li></ul><ul><li>< examination > </li></ul><ul><li>< student > </li></ul><ul><li>< roll_number >1</ roll_number > </li></ul><ul><li>< student_name >Harish</ student_name > </li></ul><ul><li>< course >Msc</ course > </li></ul><ul><li>< total_marks >275</ total_marks > </li></ul><ul><li>< out_of >400</ out_of > </li></ul><ul><li>< rank >5</ rank > </li></ul><ul><li></ student > </li></ul><ul><li>< student > </li></ul><ul><li>< roll_number >2</ roll_number > </li></ul><ul><li>< student_name >Jyotsna</ student_name > </li></ul><ul><li>< course >Msc</ course > </li></ul><ul><li>< total_marks >283</ total_marks > </li></ul><ul><li>< out_of >400</ out_of > </li></ul><ul><li>< rank >4</ rank > </li></ul><ul><li></ student > </li></ul><ul><li>< student > </li></ul><ul><li>< roll_number >3</ roll_number > </li></ul><ul><li>< student_name >Bhupendra</ student_name > </li></ul><ul><li>< course >Msc</ course > </li></ul><ul><li>< total_marks >251</ total_marks > </li></ul><ul><li>< out_of >400</ out_of > </li></ul><ul><li>< rank >7</ rank > </li></ul><ul><li></ student > </li></ul><ul><li>< student > </li></ul><ul><li>< roll_number >4</ roll_number > </li></ul><ul><li>< student_name >Senthil</ student_name > </li></ul><ul><li>< course >Msc</ course > </li></ul><ul><li>< total_marks >271</ total_marks > </li></ul><ul><li>< out_of >400</ out_of > </li></ul><ul><li>< rank >14</ rank > </li></ul><ul><li></ student > </li></ul><ul><li></ examination > </li></ul>
  26. 26. Thank you! Any Questions?

×