1 / 8

Introduction to XML

Introduction to XML. MIS3502: Application Integration and Evaluation David Schuff David.Schuff@temple.edu. A brief look at XML. Extensible Markup Language Considered to be a future standard for sending structured data over the web From browser to person (business to consumer)

lucien
Download Presentation

Introduction to XML

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to XML MIS3502: Application Integration and Evaluation David SchuffDavid.Schuff@temple.edu

  2. A brief look at XML • Extensible Markup Language • Considered to be a future standard for sending structured data over the web • From browser to person (business to consumer) • From application to application (business to business) • “Cousin” of HTML

  3. Where XML fits in SGML • Standard Generalized Markup Language (SGML) • Specification for some kind of text and tags • Hypertext Markup Language (HTML) • Definition of specific tags for formatting web pages • Extensible Markup Language (XML) • Specification for defining your own tags for formatting data HTML XML

  4. Simple XML Example • If this table were an XML document, it would look like this: <BEATLE> <NAME>John</NAME> <SSN>123456789</SSN> < BIRTHDATE >9/16/45</ BIRTHDATE ></BEATLE><BEATLE> <NAME>Ringo</NAME> <SSN>159487263</SSN> <BIRTHDATE>11/11/72</BIRTHDATE></BEATLE><BEATLE> <NAME>Paul</NAME> <SSN>321654987</SSN> <BIRTHDATE>2/20/50</BIRTHDATE></BEATLE> and so on…

  5. The XML tags mean nothing on their own Something needs to define what tags are relevant for a particular document XML Schemas are the metadata for XML XML Schemas XML Schema for a Beatle <xsd:complexType name="Beatle" > <xsd:sequence> <xsd:element name="name" type="xsd:string"/> <xsd:element name="ssn" type="xsd:long"/> <xsd:element name="birthdate" type="xsd:date"/> </xsd:sequence> </xsd:complexType>

  6. How does this help? • XML facilitates standards • XML is self-describing • XML is flexible • Industries can decide on a standard Schema • All messages can follow that standard • Makes sending data between companies easier • Order processing • Airline reservations

  7. Example: Fixed Length Records Versus XML Using Fixed Length Records: David Schuff 123456789Fox School 01234567890123456789012345678901234567890 First Name, Characters 0-9 Last Name, Characters 10-19 SSN, Characters 20-28 School Name, Characters 29-40 You have to hard code where the fields start and their length, so the application knows which characters belong to which fields. What if I have a 15 character last name? What if the last name is provided before the first name?

  8. Example: Fixed Length Records Versus XML Using XML: <PERSON> <NAME> <FIRST>David</FIRST> <LAST>Schuff</LAST> </NAME> <SSN>123456789</SSN> <SCHOOL>Fox School</SCHOOL> </PERSON> Because I have the DTD and use tags to match characters with data fields: I don’t care how long each piece of data is. I don’t care what order it arrives in. Extra fields can be included – I just retrieve a modified DTD.

More Related