Your SlideShare is downloading. ×
0
What is xml
What is xml
What is xml
What is xml
What is xml
What is xml
What is xml
What is xml
What is xml
What is xml
What is xml
What is xml
What is xml
What is xml
What is xml
What is xml
What is xml
What is xml
What is xml
What is xml
What is xml
What is xml
What is xml
What is xml
What is xml
What is xml
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

What is xml

661

Published on

XMl ppt

XMl ppt

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
661
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
29
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. XML PRESENTATIONExtensionmarkuplanguage<br />BY:<br />Sachit Singh<br />http://smartpassiveincomes.blogspot.com/<br />
  • 2. Content of presentation<br /><ul><li>Introduction
  • 3. Comparison between XML AND HTML
  • 4. XML SYNTAX
  • 5. XML QUARIES AND MEDIATORS
  • 6. Limitation of HTML
  • 7. Challenges
  • 8. Summery
  • 9. http://smartpassiveincomes.blogspot.com/</li></li></ul><li>WHAT IS XML<br /><ul><li> XML- Extension markup language
  • 10. Markup language for document containing structured information
  • 11. XML is define by four specification-
  • 12. XML- Extension markup language
  • 13. XLL- Extension link language
  • 14. XSL- Extension Style or layout language
  • 15. XUA- Extension USER agent </li></ul>http://smartpassiveincomes.blogspot.com/<br />
  • 16. XML…..<br /><ul><li>XML is based on standard generalize markup language (SGML)
  • 17. XML Version 1.0 introduced by world wide web consortium (W3C) in 1998
  • 18. Bridge for data exchange on the web </li></ul>http://smartpassiveincomes.blogspot.com/<br />
  • 19. <ul><li>XML </li></ul>Extensible set of tags<br />Content oriented<br />Standard data infrastructure<br />Allows multiple output forms<br /><ul><li>HTML</li></ul>Fixed set of tags<br />Presentation oriented<br />No data validation capability<br />Single presentation<br />Comparison <br />http://smartpassiveincomes.blogspot.com/<br />
  • 20. Authoring XML Elements<br /><ul><li>An XML element is made up of a start tag, an end tag, and data in between.</li></ul>Example:<br /> &lt;director&gt; Prabhu Deva &lt;/director&gt;<br />Example of another element with the same value:<br /> &lt;actor&gt; Salman Khan &lt;/actor&gt;<br /><ul><li>XML tags are case-sensitive:</li></ul> &lt;CITY&gt; &lt;City&gt; &lt;city&gt;<br /><ul><li>XML can abbreviate empty elements</li></ul>for example:<br /> &lt;married&gt; &lt;/married&gt; can be abbreviated to<br /> &lt;married/&gt;<br />http://smartpassiveincomes.blogspot.com/<br />
  • 21. Authoring XML Elements (cont’d)<br /><ul><li>An attribute is a name-value pair separated by an equal sign (=).</li></ul>Example:<br /> &lt;City ZIP=“400097”&gt; Malad&lt;/City&gt;<br /><ul><li>Attributes are used to attach additional, secondary information to an element.</li></ul>http://smartpassiveincomes.blogspot.com/<br />
  • 22. Authoring XML Documents<br /><ul><li>A basic XML document is an XML element that can, but might not, include nested XML elements.</li></ul>Example:<br /> &lt;books&gt;<br /> &lt;book isbn=“123”&gt;<br /> &lt;title&gt; C++ &lt;/title&gt;<br /> &lt;author&gt; Bal Guru Swami &lt;/author&gt;<br /> &lt;/book&gt;<br /> &lt;/books&gt;<br />http://smartpassiveincomes.blogspot.com/<br />
  • 23. Authoring XML Documents (cont’d)<br /><ul><li>Authoring guidelines:</li></ul>All elements must have an end tag.<br />All elements must be cleanly nested (overlapping elements are not allowed).<br />All attribute values must be enclosed in quotation marks.<br />Each document must have a unique first element, the root node.<br />http://smartpassiveincomes.blogspot.com/<br />
  • 24. Authoring XML Data Islands<br /><ul><li>A data island is an XML document that exists within an HTML page.
  • 25. The &lt;XML&gt; element marks the beginning of the data island, and its ID attribute provides a name that you can use to reference the data island.</li></ul>http://smartpassiveincomes.blogspot.com/<br />
  • 26. Authoring XML Data Islands (cont’d)<br /><ul><li>Example:</li></ul> &lt;XML ID=“XMLID”&gt;<br /> &lt;customer&gt;<br /> &lt;name&gt; Mithlesh Singh&lt;/name&gt;<br /> &lt;custID&gt; 12345 &lt;/custID&gt;<br /> &lt;/customer&gt;<br /> &lt;/XML&gt;<br />http://smartpassiveincomes.blogspot.com/<br />
  • 27. Document Type Definitions (DTD)<br /><ul><li>An XML document may have an optional DTD.
  • 28. DTD serves as grammar for the underlying XML document, and it is part of XML language.
  • 29. DTDs are somewhat unsatisfactory, but no consensus exists so far beyond the basic DTDs.
  • 30. DTD has the form:</li></ul> &lt;!DOCTYPE name [markupdeclaration]&gt;<br />http://smartpassiveincomes.blogspot.com/<br />
  • 31. DTD (cont’d)<br />Consider an XML document:<br /> &lt;db&gt;&lt;person&gt;&lt;name&gt;Mithlesh Singh&lt;/name&gt;<br /> &lt;age&gt;18&lt;/age&gt;<br /> &lt;email&gt;mith@gmail.com &lt;/email&gt;<br /> &lt;/person&gt;<br /> &lt;person&gt;………&lt;/person&gt;<br /> ……….<br /> &lt;/db&gt;<br />http://smartpassiveincomes.blogspot.com/<br />
  • 32. DTD (cont’d)<br /><ul><li>DTD for it might be:</li></ul> &lt;!DOCTYPE db [<br /> &lt;!ELEMENT db (person*)&gt;<br /> &lt;!ELEMENT person (name, age, email)&gt;<br /> &lt;!ELEMENT name (#PCDATA)&gt;<br /> &lt;!ELEMENT age (#PCDATA)&gt;<br /> &lt;!ELEMENT email (#PCDATA)&gt;<br /> ]&gt;<br />
  • 33. DTD (cont’d)<br />Occurrence Indicator:<br />
  • 34. XML Query Languages<br /><ul><li>The first XML query languages</li></ul>LOREL (Stanford)<br />XQL<br /><ul><li>Several other query languages have been developed (e.g. UNQL, XPath)</li></ul>XML-QL considered by W3C for standardization<br />Currently W3C is considering and working on a new query language: XQuery<br />http://smartpassiveincomes.blogspot.com/<br />
  • 35. A Query Language for XML: XML-QL<br /><ul><li>Developed at AT&amp;T labs
  • 36. To extract data from the input XML data
  • 37. Has variables to which data is bound and templates which show how the output XML data is to be constructed
  • 38. Uses the XML syntax
  • 39. Based on a where/construct syntax</li></ul>Where combines from and where parts of SQL<br />Construct corresponds to SQL’s select <br />
  • 40. XML-QL Query: Example 1<br /><ul><li>Retrieve all authors of books published by Bal guru swami:</li></ul> where &lt;book&gt;<br /> &lt;publisher&gt;&lt;name&gt;<br /> Bal Guru Swami <br /> &lt;/name&gt; &lt;/publisher&gt;<br /> &lt;title&gt; $T &lt;/title&gt;<br /> &lt;author&gt; $A &lt;/author&gt;<br /> &lt;/book&gt; in “www.a.b.c/abc.xml”<br /> construct &lt;result&gt; $A &lt;/result&gt;<br />
  • 41. XML-QL Query: Example 2<br /><ul><li>XML-QL query asking for all bookstores that sell The C++ Programming Language for under $25:</li></ul>where &lt;store&gt;<br /> &lt;name&gt; $N &lt;/name&gt;<br /> &lt;book&gt;<br /> &lt;title&gt; The C++ Programming Language &lt;/title&gt;<br /> &lt;price&gt; $P &lt;/price&gt;<br /> &lt;/book&gt;<br /> &lt;/store&gt; in “www.store/abc.xml”<br /> $P &lt; 25<br />construct &lt;result&gt; $N &lt;/result&gt;<br />
  • 42. Semi structured Data and Mediators<br /><ul><li>Semi structured data is often encountered in data exchange and integration
  • 43. At the sources the data may be structured (e.g. from relational databases)
  • 44. We model the data as semi structured to facilitate exchange and integration
  • 45. Users see an integrated semi structured view that they can query
  • 46. Queries are eventually reformulated into queries over the structured resources (e.g. SQL)
  • 47. Only results need to be materialized</li></li></ul><li>What is a mediator ?<br /><ul><li>A complex software component that integrates and transforms data from one or several sources using a declarative specification
  • 48. Two main contexts:</li></ul>Data conversion: converts data between two different models<br />e.g. by translating data from a relational database into XML<br />Data integration: integrates data from different sources into a common view<br />
  • 49. price<br />stock<br />StoreBook<br />Store<br />Book<br />authors<br />name<br />bid<br />phone<br />title<br />sid<br />Converting Relational Database to XML<br />Example: Export the following data into XML and group books by store<br />Relational Database:<br /> Store (sid, name, phone)<br /> Book (bid, title, authors)<br />StoreBook (sid, bid, price, stock)<br />
  • 50. Converting Relational Database to XML (Cont’d)<br /><ul><li>XML:</li></ul> &lt;store&gt; &lt;name&gt; … &lt;/name&gt;<br /> &lt;phone&gt; … &lt;/phone&gt;<br /> &lt;book&gt; &lt;title&gt;… &lt;/title&gt; <br /> &lt;authors&gt; … &lt;/authors&gt;<br /> &lt;price&gt; … &lt;/price&gt;<br /> &lt;/book&gt;<br /> &lt;book&gt;…&lt;/book&gt; <br /> …<br /> &lt;/store&gt;<br />
  • 51. Limitation of HTML<br /><ul><li>Limitations of HTML</li></ul> – Structure of data expressed as layout<br /> – Semantics of data hard to analyze and difficult to share<br /> – No schemas, no constraints<br /><ul><li> Thus XML (extensible Markup Language) has been developed</li></ul> – Markup language to define structured documents<br /> – Document schemas to fix the structure of documents<br /> – User-defined markup to express semantics<br /> – XML architecture for processing and extended functionality<br />
  • 52. Summery<br /><ul><li>What is XML?
  • 53. Comparisons of XML AND HTML
  • 54. Authoring XML Elements
  • 55. Authoring XML Elements (cont’d)
  • 56. Authoring XML Documents
  • 57. Authoring XML Documents (cont’d)
  • 58. And many more……</li></li></ul><li>THANK YOU<br />THANKS FOR HEARING ME <br />http://smartpassiveincomes.blogspot.com/<br />

×