Academic Tutorials



English | French | Portugese | German | Italian
Google

Home Source Codes E-Books Downloads Contact Us About Us

XML Tutorial
XML Introduction
XML How to use
XML Syntax
XML Elements
XML Attributes
XML Validation
XML Validator
XML Browsers
XML Viewing
XML CSS
XML XSL
XML Data Island
XML Parser
XML in Real Life
XML Namespaces
XML CDATA
XML Encoding
XML Server
XML Application
XML HTTP Request
XML Save Data
XML Behaviors
XML Technologies
XML Editors
XML Summary
XML as Data Source

HTML Tutorials
HTML Tutorial
XHTML Tutorial
CSS Tutorial
TCP/IP Tutorial
XML Tutorials
XML Tutorial
XSL Tutorial
XSLT Tutorial
DTD Tutorial
Schema Tutorial
XForms Tutorial
XSL-FO Tutorial
XML DOM Tutorial
XLink Tutorial
XQuery Tutorial
XPath Tutorial
XPointer Tutorial
RDF Tutorial
SOAP Tutorial
WSDL Tutorial
RSS Tutorial
WAP Tutorial
Web Services Tutorial
Browser Scripting
JavaScript Tutorial
VBScript Tutorial
AJAX Tutorial
DHTML Tutorial
HTML DOM Tutorial
WMLScript Tutorial
E4X Tutorial
Server Scripting
ASP Tutorial
PHP Tutorial
PERL Tutorial
SQL Tutorial
ADO Tutorial
.NET (dotnet)
Microsoft.Net
XML Web Services
ASP.Net
.Net Mobile
C# : C Sharp
ADO.NET
VB.NET
Multimedia
SVG Tutorial
Flash Tutorial
Media Tutorial
SMIL Tutorial
Web Building
Web Browsers
Web Hosting
W3C Tutorial
Web Building
Web Quality
Web Semantic
Web Careers
Java Tutorials
Java Tutorial
JSP Tutorial
Servlets Tutorial
Struts Tutorial
EJB Tutorial
JMS Tutorial
JMX Tutorial
Programming Langauges
C Tutorial
C++ Tutorial
Visual Basic Tutorial
Data Structures Using C
Soft Skills
Communication Skills
Time Management
Project Management
Team Work
Leadership Skills
Corporate Communication
Negotiation Skills


XML Data Island
Previous Next


XML data islands: A useful mechanism to display Web form data

An XML data island is Extensible Markup Language embedded in an HTML document.Data islands are not that important or helpful at that time, but if it working correctly, they can be useful for storing client-side information.


This data island itself is useless when Embedded in an HTML document.In fact, unless you choose to view the page’s source, you don’t even know that the data island is there. The fact that the data island is hidden from the casual user can be of use. The data island can provide a method of storing information on the client’s machine in much the same way that hidden HTML frames do.The main difference between Data islands and hidden HTML frames is that data islands can be bound to HTML objects. And since they are XML, they can be manipulated on the client machine as any other XML document.


Let's take example of a shopping cart. Customers expect certain features from an e-commerce application, like the ability to view a shopping cart whenever the mood strikes. Having the necessary information on the client side allows the dynamic display of the shopping cart contents.




XML Data Embedded in HTML

An XML data island is XML data embedded into an HTML page. Here is how it works; assume we have the following XML document ("employee.xml"):


<?xml version="1.0" encoding="ISO-8859-1"?>
<company>
<to>Vyom</to>
<from>TCS</from>
<heading>Reminder</heading>
<body>Employee Details</body>
</company>

Then, inside HTML document, you can embed the XML file above with the <xml> tag. The id attribute of the <xml> tag defines an ID for the data island, and the src attribute points to the XML file to embed:


<html>
<body>
<xml id="employee" src="employee.xml"></xml>
</body>
</html>


However, up to this point,the embedded XML data is, not visible for the user.

The next step is to format and display the data in the data island by binding it to HTML elements.


Bind Data Island to HTML Elements
In the next example, we will embed an XML file called "cd_catalog.xml" into an HTML file.

The HTML file looks like this:

<html>
<body>
<xml id="cdcat" src="cd_catalog.xml"></xml>
<table border="1" datasrc="#cdcat">
<tr>
<td><span datafld="ARTIST"></span></td>
<td><span datafld="TITLE"></span></td>
</tr>
</table>
</body>
</html>

Example explained:

The datasrc attribute of the <table> tag binds the HTML table element to the XML data island. The datasrc attribute refers to the id attribute of the data island. <td> tags cannot be bound to data, so we are using <span> tags. The <span> tag allows the datafld attribute to refer to the XML element to be displayed. In this case, it is datafld="ARTIST" for the <ARTIST> element and datafld="TITLE" for the <TITLE> element in the XML file. As the XML is read, additional rows are created for each <CD> element.



Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • connotea
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Netvouz
  • RawSugar
  • Reddit
  • scuttle
  • Shadows
  • Simpy
  • Smarking
  • Spurl
  • TailRank
  • Wists
  • YahooMyWeb

Previous Next

Keywords: xml id, xml document, xml file, xml data island html page, xml data binding, html data island, html xml, data island xml


HTML Quizes
HTML Quiz
XHTML Quiz
CSS Quiz
TCP/IP Quiz
XML Quizes
XML Quiz
XSL Quiz
XSLT Quiz
DTD Quiz
Schema Quiz
XForms Quiz
XSL-FO Quiz
XML DOM Quiz
XLink Quiz
XQuery Quiz
XPath Quiz
XPointer Quiz
RDF Quiz
SOAP Quiz
WSDL Quiz
RSS Quiz
WAP Quiz
Web Services Quiz
Browser Scripting Quizes
JavaScript Quiz
VBScript Quiz
AJAX Quiz
DHTML Quiz
HTML DOM Quiz
WMLScript Quiz
E4X Quiz
Server Scripting Quizes
ASP Quiz
PHP Quiz
PERL Quiz
SQL Quiz
ADO Quiz
.NET (dotnet) Quizes
Microsoft.Net Quiz
XML Web Services Quiz
ASP.Net Quiz
.Net Mobile Quiz
C# : C Sharp Quiz
ADO.NET Quiz
VB.NET Quiz
Multimedia Quizes
SVG Quiz
Flash Quiz
Media Quiz
SMIL Quiz
Web Building  Quizes
Web Browsers Quiz
Web Hosting Quiz
W3C Quiz
Web Building Quiz
Web Quality Quiz
Web Semantic Quiz
Web Careers Quiz
Java Quizes
Java Quiz
JSP Quiz
Servlets Quiz
Struts Quiz
EJB Quiz
JMS Quiz
JMX Quiz
Programming Langauges Quizes
C Quiz
C++ Quiz
Visual Basic Quiz
Data Structures Using C Quiz
Soft Skills Quizes
Communication Skills Quiz
Time Management Quiz
Project Management Quiz
Team Work Quiz
Leadership Skills Quiz
Corporate Communication Quiz
Negotiation Skills Quiz

Privacy Policy
Copyright © 2003-2008 Vyom Technosoft Pvt. Ltd., All Rights Reserved.