Home arrow XML arrow Page 4 - The Why and How of XML Data Islands
XML

The Why and How of XML Data Islands


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.

Author Info:
By: Jayaram Krishnaswamy
Rating: 5 stars5 stars5 stars5 stars5 stars / 28
July 19, 2006
TABLE OF CONTENTS:
  1. · The Why and How of XML Data Islands
  2. · Getting the names of students
  3. · Showing the complete data
  4. · HTML tags that can be bound to an XML island

print this article
SEARCH DEVARTICLES

The Why and How of XML Data Islands - HTML tags that can be bound to an XML island
(Page 4 of 4 )

An HTML table is but one of the elements for which you can bind data from an XML data island. Here are a few examples that should work.

The Button object

<input type="button" DATASRC="#WebStudents" DataFld="name"/>
will show up when browsed as:

The Textbox object

<input type="text" DATASRC="#WebStudents" DataFld="name"/>
will show up as:

The Span tag

<span DATASRC="#WebStudents" DATAFld="legacySkill"></span>
will show up as:

The DIV tag

<div DATASRC="#webstudents" DataFld="name"/></div>

The marquee tag

<marquee DATASRC="#WebStudents" DataFld="name"> </marquee> caught at a fixed location as:

caught while entering

Summary

This tutorial considered embedding a well formed XML fragment into an HTML file to create an XML data island and showed how one could access data embedded in the XML file. The tutorial also showed the different HTML tags to which the data from the XML data island can be bound. With XML becoming ever more pervasive and the client side implementation gaining a lot of ground, a working knowledge of XML data islands is deemed essential; this tutorial is addressed to provide such a background. The browser specific nature of the source code makes it necessary to hide the XML island from non-IE browsers. This concern is not addressed in the tutorial.


DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

blog comments powered by Disqus
XML ARTICLES

- Open XML Finally Supported by MS Office
- XML Features Added to Two Systems
- Using Regions with XSL Formatting Objects
- Using XSL Formatting Objects
- More Schematron Features
- Schematron Patterns and Validation
- Using Schematron
- Datatypes and More in RELAX NG
- Providing Options in RELAX NG
- An Introduction to RELAX NG
- Path, Predicates, and XQuery
- Using Predicates with XQuery
- Navigating Input Documents Using Paths
- XML Basics
- Introduction to XPath

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials