Search
Lori MacVittie - Two Different Socks
You are here: DevCentral > Weblogs

posted on Wednesday, February 28, 2007 8:29 AM

This isn't Gilligan's Island, but it's close

To a developer, an XML data island is pretty straightforward, but to a network or systems administrator? It might be a bit confusing.

An XML island is a piece of XML embedded within an HTML document that can be used to associate data with an HTML object, such as a list box or text field. This is not new, Internet Explorer has had this capability for several years and many a developer has used this feature on the client as it is very similar to its ADO functionality.

What's interesting is that XAML, Microsoft's new interface markup language, also offers similar functionality, though it's not really an island as the language is all XML anyway.  

Now, before you get crazy with the XML island idea, you have to understand that it is a Microsoft specific extension and isn't directly supported by browsers like Firefox. Yeah, I know, they're cool and you want it to be cross-browser, but right now the best you can do is emulate XML data islands in Firefox.

Will they ever be supported in Firefox? Well, the XMLHTTPRequest object was once a Microsoft only extension and look at it now - it's a stock object in all browsers and even has a W3C working group hovering over a specification. So it could happen, depending on how much demand there is for them. I suspect that this feature, which has been available for quite some time in IE (since 5.5 at least), will finally start to garner more interest as Web 2.0 and AJAX picks up steam and that demand will rise accordingly. Eventually we'll see it in Firefox and then look out world!

Anyway, back to the discussion. So an XML island makes it possible (in IE) to bind xml data embedded in a web page to specific components (or elements, if you're thinking of a web page as XHTML). 

<xml id="location" async="false">
       <city>Easton</city>
       <state>Pennsylvania</state>
</xml>

<input type=”text” datasrc=”#location” datafld=”city” />
<input type=”text” datasrc=”#location” datafld=”state” /> 

The result would appear (in IE) as:



What's even cooler is that binding XML to a table in IE results in a dynamically generated table containing all the data. I know, right? That's awesome. Especially when you combine that with the XMLHTTPRequest object and can grab XML to easily replace the "location" xml without much effort, updating the fields on the fly.

Yes, there are some security risks, there always is when you start tossing XML back and forth between the client and the server. But that's a discussion for another day.

Imbibing: Coffee

Technorati tags: , , , ,


Feedback

3/28/2008 2:05 PM
Gravatar Pretty cool article. I know you have a disclaimer about cross-browser functionality. It seems today, any development effort centered around a microsoft-only solution is, well - the word that comes to mind is worthless. Too many browser flavors exist therefore we can no longer expect a web based solution to be viewed only with ie. Additionally, different versions of ie work differently with these non-standard Microsoft offerings.

Personally, I use a variety of systems - Linux, Windows, MacOS. Each has a browser. I want to be able to get to web content regardless of what system I am driving. I think this is becoming more prevelant too. Microsoft software may provide more bells and whistles compared to open source software, buy they also offer more hassle. This is a real problem, especially for legit users.

I dunno, I shy away from Microsoft specific solutions. I can see spending alot of effort to create a solution only to find out it can't really be enjoyed because the intended users don't always use Microsoft products. It's almost as if the Microsoft offering doesn't even exist if its not cross-browser compatible. What a waste.
barrypicker

Let Me Know What You Think


Please use the form below if you have any comments, questions, or suggestions.

Title:
 
Name:
 
Email: (so we can show your gravatar)
Website:
Comment: Allowed tags: blockquote, a, strong, em, p, u, strike, super, sub, code
 
Please add 7 and 4 and type the answer here:

Blog Stats

Posts:980
Comments:1685
Stories:0
Trackbacks:583
  

Image Galleries

  

Application Delivery

  

Cloud Computing

  

Random

  

Security

  

Chat Catcher

82,243 Members in 102 Countries and Growing!

Join DevCentral Today!

About DevCentral

DevCentral has been a successful, thriving community for many years. We have always strived to bring you the best technical documentation, discussion forums, blogs, media and much more that we can.

So dive in, get familiar with DevCentral. We hope you like it, we hope it makes your job easier, and lets you get that much more power out of the community. To learn more, make sure to check out the Getting Started section. And if you have any problems, or think something could be easier to use, drop us a line to let us know.

Got It !

We've received your comment and transmitted it directly to DevCentral HQ.

Thanks for taking time to let us know what's on your mind. At DevCentral | Community Matters!

Get In Touch With Us

Have questions, suggestions or just want to get something off your chest?

Use our handy form below to Direct Connect with DevCentral Mission Control.

Send Us Feedback       or