Week1 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
1,687
On Slideshare
1,315
From Embeds
372
Number of Embeds
2

Actions

Shares
Downloads
10
Comments
0
Likes
0

Embeds 372

http://www.urshula.com 370
http://webcache.googleusercontent.com 2

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
  • Every XML-document is text-based=> sharing data between different computers!=> sharing data in Internet!=> platform independence!Problems with Binary formatPlatform independanceFirewallsHard to debugInspecting the file can be hardSince XML is text-based, it does not have the problems mentioned above.
  • Office 2010
  • XML documents have the file extension .xml  Includes XML  Declaration eg   One root- element   eg   Every  tag  is  opened  and  ended     Attributes are inside quotations Has no overlapping tags Is Case sensitive  

Transcript

  • 1. XML
    Extensible Markup Language (XML) is a powerful mechanism of data exchange. It is an ideal solution for transferring structured data from server-to-client, server-to-server or an application-to-application.
  • 2. What is XML?
    XML stands for eXtensibleMarkup Language
    XML is a meta-markup language thats specifies rules for creating mark up languages
    XML was designed to CARRY data, not to display data
     XML does not have any fixed set of tags (hence is extensible!) You must define your tags
    XML is designed to be self-descriptive
    XML is case-sensitive. Hence in an XML document <account>, <Account> and <ACCOUNT> are three different tags.
    XML is a W3C Recommendation
    Every XML-document is text-based and have the file extension .xml
    Questions:
    What is meant by text based (as opposed to binary) here?
    Why is XML being text based then an advantage?
  • 3. The Difference Between XML and HTML
    XML is not a replacement for HTML.
    XML and HTML were designed with different goals:
    XML was designed to transport and store data, with focus on what the data is
    HTML was designed to display data, with focus on how data looks
    HTML is about displaying information, while XML is about carrying information.
  • 4. XML Does Not DO Anything
    Maybe it is a little hard to understand, but XML does not DO anything. XML was created to structure, store, and transport information.
    XML tags are actually elements
    Elements can have sub elements or child elements just like html and other markup languages
  • 5. XML is Not a Replacement for HTML
    XML is a complement to HTML.
    It is important to understand that XML is not a replacement for HTML. In most web applications, XML is used to transport data, while HTML is used to format and display the data.
    XML is a software- and hardware-independent tool for carrying information.
    XML is Everywhere
    XML is now as important for the Web as HTML was to the foundation of the Web.
    XML is the most common tool for data transmissions between all sorts of applications.
    Can you think of anywhere that XML is in use?
  • 6. An XML example:
    This example is quite self descriptive. It has sender and receiver information, it also has a heading and a message body.
    But still, this XML document does not DO anything. It is just information wrapped in tags. Someone must write a piece of software to send, receive or display it.
    With XML You Invent Your Own Tags
    The tags in the example (like <to> and <from>) are not defined in any XML standard. These tags are "invented" by the author of the XML document.
    That is because the XML language has no predefined tags.
    The tags used in HTML are predefined. HTML documents can only use tags defined in the HTML standard (like <p>, <h1>, etc.).
    XML allows the author to define his/her own tags and his/her own document structure.
    <?xml version="1.0" ?><note><sender id=”02”>Tove</sender><from>Jani</from><heading>Reminder</heading><body>Don't forget me this weekend!</body></note>
  • 7. “Well formed” XML Syntax and Rules
    XML documents have the file extension .xml
      Includes XML  Declaration eg <?xml version="1.0" ?> 
    One root- element   eg <note> 
    Every  tag  is  opened  and  ended   <from> </from> 
    Attributes are inside quotations <sender id=”02”>
    Has no overlapping tags
    Is Case sensitive  
  • 8. Exercise 1
    Is the following xml file wellformed?
    Does it utilise sub elements or child elements
    <booklist> <book id=01> <title>XML Made Easy</title> <author>John Smith</Author> book></booklist>
  • 9. Exercise 2
    Open Dreamweaver Define a new site
    Create a new xml document with the previous content but ensure it is “well formed”.
    Open this xml document in a browser the xml tags should display and be colour coded. Why are they a different content to the “tag” content?
  • 10. Exercise 3
    Download an flash image slideshow from http://www.flashxml.net/basic-files/
    Download these images http://www.urshula.com/xtras/week10images.zip
    Edit the xml to include only my images that I asked you to download (the hyperlinks can go to http://www.urshula.com; http://www.google.com; http://www.northcoast.tafensw.edu.au; and any where else you want.)
    Look at the xml document from flashxml is it well formed?
    What is the root element ?
    What sub elements and attributes does it use?