XML
  Home arrow XML arrow The Why and How of XML Data Islands
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Download TestComplete 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
XML

The Why and How of XML Data Islands
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 9
    2006-07-19

    Table of Contents:
  • The Why and How of XML Data Islands
  • Getting the names of students
  • Showing the complete data
  • HTML tags that can be bound to an XML island

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    Iron Speed
     
    ADVERTISEMENT

    TestComplete™ automates software testing for a fraction of what the big guys charge. Easy functional and load testing for all Windows, .NET, Java and Web apps. Download a free trial now.

    The Why and How of XML Data Islands
    (Page 1 of 4 )

    This article explains a useful way to embed data in an HTML document, and store it on the client, using XML. With XML becoming ever more pervasive and the client side implementation gaining a lot of ground, you will probably find yourself using this technique in many projects.

    Introduction

    What is an XML data island? Simply stated it is data in the form of XML embedded in an HTML document. By embedding XML data you create an XML data island, thereby storing your data on the client. This is not good enough. You also want to know how to access it. The HTML elements on the page can be bound to the XML data island and make them come to life, on the client. In reality an XML data island represents a built-in Data Source Object in the IE browser. This means you do not need <object/> tags to embed the control.

    Example describing an XML data island

    First of all, to get a handle on XML data islands, let us start with a simple HTML file, Simple.htm, with some embedded XML. Of course, you can create your own XML file, but for this tutorial please follow the code shown in the next paragraph. For the embedded XML file, the webstudents.xml file used in my other tutorials will be used. This is how this XML is displayed by the parser on the IE. In the HTML file the XML data island is a different color.

     

    Simple.htm
    <HTML> 
    <HEAD> 
    <TITLE> </TITLE> 
    </HEAD>
    <BODY> <h3>Html file with embedded XML</h3> <P>Here begins the XML Data Island</P>   <xml id="WebStudents"> <wclass> <!-- My students who attended my web programming class --> <student id="1"> <name>Linda Jones</name> <legacySkill>Access, VB5.0</legacySkill> </student> <student id="2"> <name>Adam Davidson</name> <legacySkill>Cobol, MainFrame</legacySkill> </student> <student id="3"> <name>Charles Boyer</name> <legacySkill>HTML, Photoshop</legacySkill> </student> <student id="4"> <name>Charles Mann</name> <legacySkill>Cobol, MainFrame</legacySkill> </student> </wclass> </xml>  <P>Here ends the XML Data Island</P> </BODY> </HTML>

    When you display this page in the browser, what you will see is only this. There is nothing to indicate that something is embedded.

    simple.htm

    If you review the embedded XML file you notice that it has an id called "WebStudents." You also notice that it has well formed XML content. The data content of this file includes the student ids, student names and their skill sets.

    More XML Articles
    More By Jayaram Krishnaswamy


       · It's not trip and tricks with XML. It's the real stuff. The HTML using font color is...
       · I do not recall, in your article, that this was an IE Only capability.I'd love to...
       · Looks like I did not, although I exclusively referred to IE. XML Data Island is...
       · IE-only tech is useless. It's not the only browser on the planet. I like the idea,...
       · This is one way of doing. I want to know when the browser war will be finished so...
       · I've been looking and studing AJAX for a while now, libraries such as Ruby on Rails,...
       · I would like to add a little extra something upon my research into this...
       · Couple of months ago I wrote this in my blog. Not quite like Microsfot's take.I know...
       · My blog link in my previous message was scrubbed and my senetnece was hanging...
     

    XML ARTICLES

    - Path, Predicates, and XQuery
    - Using Predicates with XQuery
    - Navigating Input Documents Using Paths
    - XML Basics
    - Introduction to XPath
    - Simple Web Syndication with RSS 2.0
    - Java UI Design with an IDE
    - UI Design with Java and XML Toolkits
    - Displaying ADO Retrieved Data with XML Islan...
    - Widget Walkthrough
    - Introduction to Widgets
    - The Why and How of XML Data Islands
    - Creating an XUL App Installer
    - Overlays in XUL
    - Skinning Your Custom XUL Applications






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway