What is xml
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
792
On Slideshare
792
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
21
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
    BY:
    Sachit Singh
    http://smartpassiveincomes.blogspot.com/
  • 2. Content of presentation
    • 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/
  • WHAT IS XML
    • 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
    http://smartpassiveincomes.blogspot.com/
  • 16. XML…..
    • 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
    http://smartpassiveincomes.blogspot.com/
  • 19.
    • XML
    Extensible set of tags
    Content oriented
    Standard data infrastructure
    Allows multiple output forms
    • HTML
    Fixed set of tags
    Presentation oriented
    No data validation capability
    Single presentation
    Comparison
    http://smartpassiveincomes.blogspot.com/
  • 20. Authoring XML Elements
    • An XML element is made up of a start tag, an end tag, and data in between.
    Example:
    <director> Prabhu Deva </director>
    Example of another element with the same value:
    <actor> Salman Khan </actor>
    • XML tags are case-sensitive:
    <CITY> <City> <city>
    • XML can abbreviate empty elements
    for example:
    <married> </married> can be abbreviated to
    <married/>
    http://smartpassiveincomes.blogspot.com/
  • 21. Authoring XML Elements (cont’d)
    • An attribute is a name-value pair separated by an equal sign (=).
    Example:
    <City ZIP=“400097”> Malad</City>
    • Attributes are used to attach additional, secondary information to an element.
    http://smartpassiveincomes.blogspot.com/
  • 22. Authoring XML Documents
    • A basic XML document is an XML element that can, but might not, include nested XML elements.
    Example:
    <books>
    <book isbn=“123”>
    <title> C++ </title>
    <author> Bal Guru Swami </author>
    </book>
    </books>
    http://smartpassiveincomes.blogspot.com/
  • 23. Authoring XML Documents (cont’d)
    • Authoring guidelines:
    All elements must have an end tag.
    All elements must be cleanly nested (overlapping elements are not allowed).
    All attribute values must be enclosed in quotation marks.
    Each document must have a unique first element, the root node.
    http://smartpassiveincomes.blogspot.com/
  • 24. Authoring XML Data Islands
    • A data island is an XML document that exists within an HTML page.
    • 25. The <XML> element marks the beginning of the data island, and its ID attribute provides a name that you can use to reference the data island.
    http://smartpassiveincomes.blogspot.com/
  • 26. Authoring XML Data Islands (cont’d)
    • Example:
    <XML ID=“XMLID”>
    <customer>
    <name> Mithlesh Singh</name>
    <custID> 12345 </custID>
    </customer>
    </XML>
    http://smartpassiveincomes.blogspot.com/
  • 27. Document Type Definitions (DTD)
    • 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:
    <!DOCTYPE name [markupdeclaration]>
    http://smartpassiveincomes.blogspot.com/
  • 31. DTD (cont’d)
    Consider an XML document:
    <db><person><name>Mithlesh Singh</name>
    <age>18</age>
    <email>mith@gmail.com </email>
    </person>
    <person>………</person>
    ……….
    </db>
    http://smartpassiveincomes.blogspot.com/
  • 32. DTD (cont’d)
    • DTD for it might be:
    <!DOCTYPE db [
    <!ELEMENT db (person*)>
    <!ELEMENT person (name, age, email)>
    <!ELEMENT name (#PCDATA)>
    <!ELEMENT age (#PCDATA)>
    <!ELEMENT email (#PCDATA)>
    ]>
  • 33. DTD (cont’d)
    Occurrence Indicator:
  • 34. XML Query Languages
    • The first XML query languages
    LOREL (Stanford)
    XQL
    • Several other query languages have been developed (e.g. UNQL, XPath)
    XML-QL considered by W3C for standardization
    Currently W3C is considering and working on a new query language: XQuery
    http://smartpassiveincomes.blogspot.com/
  • 35. A Query Language for XML: XML-QL
    • Developed at AT&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
    Where combines from and where parts of SQL
    Construct corresponds to SQL’s select
  • 40. XML-QL Query: Example 1
    • Retrieve all authors of books published by Bal guru swami:
    where <book>
    <publisher><name>
    Bal Guru Swami
    </name> </publisher>
    <title> $T </title>
    <author> $A </author>
    </book> in “www.a.b.c/abc.xml”
    construct <result> $A </result>
  • 41. XML-QL Query: Example 2
    • XML-QL query asking for all bookstores that sell The C++ Programming Language for under $25:
    where <store>
    <name> $N </name>
    <book>
    <title> The C++ Programming Language </title>
    <price> $P </price>
    </book>
    </store> in “www.store/abc.xml”
    $P < 25
    construct <result> $N </result>
  • 42. Semi structured Data and Mediators
    • 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
  • What is a mediator ?
    • A complex software component that integrates and transforms data from one or several sources using a declarative specification
    • 48. Two main contexts:
    Data conversion: converts data between two different models
    e.g. by translating data from a relational database into XML
    Data integration: integrates data from different sources into a common view
  • 49. price
    stock
    StoreBook
    Store
    Book
    authors
    name
    bid
    phone
    title
    sid
    Converting Relational Database to XML
    Example: Export the following data into XML and group books by store
    Relational Database:
    Store (sid, name, phone)
    Book (bid, title, authors)
    StoreBook (sid, bid, price, stock)
  • 50. Converting Relational Database to XML (Cont’d)
    • XML:
    <store> <name> … </name>
    <phone> … </phone>
    <book> <title>… </title>
    <authors> … </authors>
    <price> … </price>
    </book>
    <book>…</book>

    </store>
  • 51. Limitation of HTML
    • Limitations of HTML
    – Structure of data expressed as layout
    – Semantics of data hard to analyze and difficult to share
    – No schemas, no constraints
    • Thus XML (extensible Markup Language) has been developed
    – Markup language to define structured documents
    – Document schemas to fix the structure of documents
    – User-defined markup to express semantics
    – XML architecture for processing and extended functionality
  • 52. Summery
    • 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……
  • THANK YOU
    THANKS FOR HEARING ME
    http://smartpassiveincomes.blogspot.com/