160 likes | 375 Views
XML. Topics: XML and its relation to SGML and HTML Applications of XML. Introduction. The extraordinary growth of the World Wide Web The advent of Hypertext Markup Language(HTML) The limitations of HTML The introduction of XML XML and/vs Java.
E N D
Topics: • XML and its relation to SGML and HTML • Applications of XML
Introduction The extraordinary growth of the World Wide Web The advent of Hypertext Markup Language(HTML) The limitations of HTML The introduction of XML XML and/vs Java
XML and its relation to SGML and HTML: a discussion of: What is XML? XML verse SGML XML verse HTML Why XML?
XML XML:Extensible Markup Language. Developed by:World Wide Web Con. (W3C) Purpose: industry-specific markup, electronic data exchange Made up of: elements, which contain either parsed or unparsed data. DTD: Document type definition
XML file sample <?xml version= '1.0'?> <!DOCTYPE PATIENTRECORD [ <!ELEMENT PATIENTRECORD (PATIENT)*> <!ELEMENT PATIENT (LASTNAME, FIRSTNAME, MEDICAL_HISTORY, PHONE_NO)> <!ELEMENT LASTNAME (#PCDATA)> <!ELEMENT FIRSTNAME (#PCDATA)> <!ELEMENT MEDICAL_HISTORY (#PCDATA)> <!ELEMENT PHONE_NO (#PCDATA)> ]> <PATIENTRECORD> <PATIENT> <LASTNAME>Anderson</LASTNAME> <FIRSTNAME>Robert</FIRSTNAME> <MEDICAL_HISTORY>Flue, june 98</MEDICAL_HISTORY> <PHONE_NO>334-884-9999</PHONE_NO> </PATIENT>
XML Verse SGML SGML: Standard Generalized Markup Language, created in 1986, it is for definition of platform and system independent electronic data, it is flexible and complicated. XML: a subset of SGML, makes SGML easy to use
Applications of XML • As a universal hub for database interchange • Electronic data exchange between organizations • or applications. • To distribute a significant proportion of the • processing load from the Web server to the • Web client. (vs Java?)
XML as a universal hub for database interchange Database A Database B Database F Data displayed in XML format Database C Database E Database D
Data display in HTML format can not be used for interchange Database A Database F Database B Data displayed in HTML format Database C Database E Database D
XML for EDI EDI: Electronic Data Interchange Problem with EDI: Format: X12 and EDIFACT are complicated Cost: expensive XML for EDI: inexpensive, simple
Mapping between Java Objects and XML Elements PATIENTRECORD PatientRecord PATIENT Patient
Freely available software packages that can be used for experimentation • JDK1.2 • JSDK: Java Servlet Development Kit • XML4j1.1.14: XML Parser • Pi3Web: Web server • Netscape Browser