Cdata and ends with xml vs semi structured data cdata

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 2 3/11/13 CS480 Principles of Data Management Spring 2013 CS480 Principles of Data Management Comment - example Spring 2013 Processing Instructions   Allow document to contain instruc�ons for Syntax applica�ons <?PITarget PIContent?> <!-- declarations for <head> & <body> --> Examples <!-- B+ -- 88~90 --> <?xml-stylesheet type="text/xsl" href="style.xsl"?> <?xml-stylesheet type="text/css" href="style.css"?> <!-- B+, B, or B---> CS480 Principles of Data Management Spring 2013 CS480 Principles of Data Management Spring 2013 CDATA   Character data –  A sec�on of elements marked for the parser to interpret as only character data, not markup –  “<“ and “&” would be represented by “&gt” and “&amp” –  Starts with <![CDATA[ and ends with ]]>� XML vs. Semi-structured Data <![CDATA[ …]> <sender>John Smith </sender> <![CDATA[<sender>John Smith</sender>]]> Same as: &lt;sneder&gt;John Smith&lt;/sender&gt; CS480 Principles of Data Management XML vs. Semi-structured Data   Are they the same thing? Spring 2013 CS480 Principles of Data Management Spring 2013 Basic XML syntax is perfectly suited for describing semi-structured data XML <person> <name> Alan </name> <age> 42 </age> <email> sgg@abc.com </email> </person> SSD {person: {name:”Alan”, age: 42, email: sgg@abc.com}}   For tree style ssd-­‐expression, transla�ng to XML can be straigh�orward. 3 3/11/13 CS480 Principles of Data Management Spring 2013   Subtle dis�nc�on between an XML element and an ssd-­‐expression Ambiguity introduced by a�ributes XML Graph Model XML References XML Order Mixing elements and text   Dis�nc�on –  SSD-­‐expression denotes graphs with labels on edges –  XML denotes graphs with labels on nodes CS480 Principles of Data Management Spring 2013 XML Graph model example email 3123453 SSD expression agg@abc.com XML data “Alan” phone   <state-of> is an empty element   idref is used to reference (via an a�ribute value) another elem...
View Full Document

This note was uploaded on 02/11/2014 for the course CS 480 taught by Professor Staff during the Spring '08 term at Colorado State.

Ask a homework question - tutors are online