FREE tutorial,solution,RSS Feeds on Operating Systems, Programming, Web Development, Applications, Databases, Networking, Hardware, Security, SEO Free Expertsforge Membership
Join us as Moderator
Submit Article to Expertsforge.com Submit Article My Expertsforge
 
RSS Feeds, Help Help RSS Feeds
bannertop
 

XML Tutorial: Embed XML into HTML using Data Island

jawahar
5/2/2005 12:54:00 AM, Views: 5266
With Internet Explorer, XML can be embedded into HTML pages in Data Islands.

XML Embedded in HTML

The unofficial <xml> tag is used to embed XML data within HTML.

XML data can be embedded directly into an HTML page like this:

<xml id="note">
<note>
   <to>Tove</to>
   <from>Jani</from>
   <heading>Reminder</heading>
   <body>Don't forget me this weekend!</body>
</note>
</xml>


And an external XML file can be embedded like this:

<xml id="note" src="note.xml">
</xml>


Note: The <xml> tag is an HTML element, not an XML element.
Data Binding

XML Data Islands can be bound to HTML elements 

In the example below, an XML Data Island with an ID of "cdcat" is loaded from an external XML file ("cd_catalog.xml"). Next, the HTML table element is bound to the Data Island with the datasrc attribute, and finally the td elements are bound to the XML data with a datafld attribute inside a span element.

<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>
Next Steps:
Add this Tutorial to:
Blink Blink del.icio.ous Del.icio.us Digg Digg
Fark Fark Furl Furl Google Google
Reddit Reddit Simpy Simpy Spurl Spurl
Technorati Technorati Windows Live Win Live Yahoo Yahoo
Rate Me!
Avg Visitor Rating: Average Visitor Rating is 1 out of 5
Number of Ratings : 2 Votes
Rate:
Send Private MessageSend Message
Signup / Login To View the Solution or Provide Comments
Post Comment/Solution
Comment:*
        (Link Rules) 
  Use : [bold] for <b>; [/bold] for </b>; [italic] for <i>; [/italic] for </i>; [code] & [/code] for code
 
Categories
Options
XML RSS Feed
jsamwini
Most Popular Tutorial
Most Popular Solution
No Records!
Top Rated
Top Rankers
Overall
1. jawahar (100)
2. charlie_fink (50)
Yearly -2008
No Rankings!
Expertsforge Sponsors
bnrtop