{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

XML1 - XML and Beyond XML Motivation Huge amounts of...

Info icon This preview shows pages 1–17. Sign up to view the full content.

View Full Document Right Arrow Icon
XML and Beyond
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
XML Motivation Huge amounts of unstructured data on the web: HTML documents No structure information Only format instructions (presentation) Integration of data from different sources Structural differences Closely related to semistructured data
Image of page 2
Semistructured Data Integration of heterogeneous sources Data sources with non rigid structures Biological data Web data Need for more structural information than plain text, but less constraints on structure than in relational data
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Characteristics of Semistructured Data Missing or additional tuples Multiple attributes Different types in different objects Heterogeneous collection Self-describing, irregular data with no apriori structure
Image of page 4
HTML Document Example <h1> Bibliography </h1> <p> <i> Foundations of Databases </i> Abiteboul, Hull, Vianu <br> Addison Wesley, 1995 <p> <i> Data on the Web </i> Abiteoul, Buneman, Suciu <br> Morgan Kaufmann, 1999 Type of information Title Authors Year book
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
The Idea Behind XML Easily support information exchange between applications / computers Reuse what worked in HTML Human readable Standard Easy to generate and read But allow arbitrary markup Uniform language for semistructured data Data Management
Image of page 6
XML eXtensible Markup Language Universal standard for documents and data Defined by W3C Set of emerging technologies XLink, XPointer, XSchema, DOM, SAX, XPath, XQuery,…
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
XML XML gives a syntax, not a semantic XML defines the structure of a document, not how it is processed Separate structural information from format instructions
Image of page 8
The Structure of XML XML consists of tags and text Tags come in pairs <date> ...</date> They must be properly nested <date> <day> ... </day> ... </date> --- good <date> <day> ... </date> ... </day> --- bad (You can’t do <i> ... <b> ... </i> ... </b> in HTML)
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
XML text XML has only one “basic” type -- text. It is bounded by tags e.g. <title> The Big Sleep </title> <year> 1935 </ year> --- 1935 is still text XML text is called PCDATA (for parsed character data). It uses a 16-bit encoding.
Image of page 10
XML structure Nesting tags can be used to express various structures. E.g. A tuple (record) : <person> <name> Malcolm Atchison </name> <tel> (215) 898 4321 </tel> <email> [email protected] </email> </person>
Image of page 11

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
XML structure We can represent a list by using the same tag repeatedly: <addresses> <person> ... </person> <person> ... </person> <person> ... </person> ... </addresses>
Image of page 12
Terminology The segment of an XML document between an opening and a corresponding closing tag is called an element. <person> <name> Malcolm Atchison </name> <tel> (215) 898 4321 </tel> <tel> (215) 898 4321 </tel> <email> [email protected] </email> </person> element not an element element, a sub-element of
Image of page 13

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
XML is tree-like person name email tel tel Malcolm Atchison (215) 898 4321 (215) 898 4321 [email protected]
Image of page 14
Mixed Content An element may contain a mixture of sub-elements and PCDATA <airline> <name> British Airways </name> <motto> World’s <dubious> favorite </dubious> airline </motto> </airline> Data of this form is not typically generated from databases. It is needed for consistency with HTML
Image of page 15

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
A Complete XML Document <?xml version = "1.0"? > <person>
Image of page 16
Image of page 17
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern